From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: PT Newsgroups: gmane.emacs.help Subject: Structured data in Emacs Lisp Date: Tue, 26 Apr 2005 17:20:42 +0200 Organization: Aioe.org NNTP Server Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 Content-Transfer-Encoding: Quoted-Printable X-Trace: sea.gmane.org 1114528896 652 80.91.229.2 (26 Apr 2005 15:21:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Apr 2005 15:21:36 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 26 17:21:32 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DQRqO-0006yS-Pp for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Apr 2005 17:19:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQRw8-00012c-I0 for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Apr 2005 11:25:20 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!newsserver.news.garr.it!irazu.switch.ch!switch.ch!in2p3.fr!proxad.net!exabot.com!aioe.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: Ro95BftT46NzjJz3WaSlRQ.domitilla.aioe.org Original-X-Complaints-To: abuse@aioe.org Original-NNTP-Posting-Date: Tue, 26 Apr 2005 15:20:23 +0000 (UTC) User-Agent: Opera M2/8.0 (Win32, build 7561) Original-Xref: shelby.stanford.edu gnu.emacs.help:130484 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:26052 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26052 I'm writing a moderately complex Emacs package and not being a Lisp guru= I = wonder what is the best way to handle data structures in Elisp. The = emphasis is not on efficiency, rather on readability. For example, from a function I want to return three values. How should I= = do this? Using a list? (Value1 Value2 Value3)? This has the disadvantage of storing specific values on specific = positions, so the caller must now the first element of the list is Value= 1, = etc. And what if the return value is changed later and Value2 is not = returned anymore? Then I have to fix every invocation of the function. Or maybe an association list? '((value1 . 3) (value2 . 4) (value3 . 5)) It's certainly more resistant to code changes, but feels a bit = heavyweight. (Maybe its just me.) Or is there an other Lispish way to handle structured data I don't know = = about? -- = Using Opera's revolutionary e-mail client: http://www.opera.com/m2/