[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
One more question about elisp
From: |
Francis Moreau |
Subject: |
One more question about elisp |
Date: |
Fri, 6 Nov 2009 08:46:59 -0800 (PST) |
User-agent: |
G2/1.0 |
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
- One more question about elisp,
Francis Moreau <=
- Re: One more question about elisp, Joost Kremers, 2009/11/06
- Re: One more question about elisp, Francis Moreau, 2009/11/06
- Re: One more question about elisp, Pascal J. Bourguignon, 2009/11/06
- Re: One more question about elisp, Stefan Monnier, 2009/11/06
- Re: One more question about elisp, Francis Moreau, 2009/11/08
- Re: One more question about elisp, Pascal J. Bourguignon, 2009/11/08
- Re: One more question about elisp, Francis Moreau, 2009/11/09
- Re: One more question about elisp, Stefan Monnier, 2009/11/08
Re: One more question about elisp, Xah Lee, 2009/11/07