unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* One more question about elisp
@ 2009-11-06 16:46 Francis Moreau
  2009-11-06 16:55 ` Joost Kremers
  2009-11-06 20:02 ` Xah Lee
  0 siblings, 2 replies; 23+ messages in thread
From: Francis Moreau @ 2009-11-06 16:46 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I'm now wondering what is the elisp way to create structured objects
and how to access them later.

For example I want to create a structure/object which store
information about a person.

In C language, I would do something like this:

structure person {
    int age;
    char *name;
};

For an object oriented language, Python for example, I would do:

class Person(object):
    def __init__(self, age, name):
        self.age = age
        self.name = name

but how I do that in elisp ?

Should I use a list ? That wouldn't be convenient for accessing the
'fields' of the object later since I need to use an index rather than
a name field.

Could anybody provide a pointer or any hints ?

Thanks


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2009-11-09 21:14 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-06 16:46 One more question about elisp Francis Moreau
2009-11-06 16:55 ` Joost Kremers
2009-11-06 20:59   ` Francis Moreau
2009-11-06 21:28     ` Pascal J. Bourguignon
2009-11-07  1:42     ` Stefan Monnier
2009-11-08 15:20       ` Francis Moreau
2009-11-08 16:12         ` Pascal J. Bourguignon
2009-11-09 21:14           ` Francis Moreau
2009-11-08 19:53         ` Stefan Monnier
2009-11-06 20:02 ` Xah Lee
2009-11-06 21:05   ` Francis Moreau
2009-11-06 21:13     ` David Kastrup
2009-11-07  1:40     ` LanX
2009-11-07  2:31       ` Barry Margolin
2009-11-07 14:41       ` Francis Moreau
2009-11-07 17:39         ` Pascal J. Bourguignon
2009-11-07 18:10         ` LanX
2009-11-08  9:53         ` tomas
     [not found]         ` <mailman.10267.1257674530.2239.help-gnu-emacs@gnu.org>
2009-11-08 15:17           ` Francis Moreau
2009-11-08 16:01             ` Pascal J. Bourguignon
2009-11-09 20:43               ` Francis Moreau
2009-11-08 17:06             ` tomas
2009-11-07  2:50     ` Giorgos Keramidas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).