[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Structured data in Emacs Lisp

From: Christopher C. Stacy
Subject: Re: Structured data in Emacs Lisp
Date: Mon, 09 May 2005 21:39:01 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

PT <address@hidden> writes:

> For example, from a function I want to return three values. 
> How should I  do this?

> Using a list? (Value1 Value2 Value3)?

> Or maybe an association list? '((value1 . 3) (value2 . 4) (value3 . 5))

> Or is there an other Lispish way to handle structured
> data I don't know about?

This isn't going to help with your Emacs problem, but just so 
you know: Emacs Lisp is a very simple kind of Lisp, lacking many
features present in most modern (post-1979) dialects of Lisp.  
For example, in ANSI Common Lisp, you can directly pass mutiple 
values around without packing them into some kind of container.  
And for representing structured data, you can use either structs 
or object-oriented programming. There are of course many other 
data types and a zillion other important features in "real" 
Lisp that Emacs Lisp doesn't have.   I'm telling you this
because you asked for a "Lispy" way to do things.

I think the "CL" library in Emacs Lisp might give 
you some version of DEFSTRUCT, which is something
like the one in Common Lisp.

reply via email to

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