[Top][All Lists]

[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


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 = 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 ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]