From ... From: Erik Naggum Subject: Re: Macro question (bizarre) Date: 2000/03/18 Message-ID: <3162359744057189@naggum.no>#1/1 X-Deja-AN: 599089409 References: <38D22BF9.DFFE6E3E@emi.u-bordeaux.fr> <8atcu9$f6m$1@nnrp1.deja.com> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 953371147 23439 195.0.192.66 (18 Mar 2000 09:19:07 GMT) Organization: Naggum Software; vox: +47 8800 8879; fax: +47 8800 8601; http://www.naggum.no User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 Mime-Version: 1.0 NNTP-Posting-Date: 18 Mar 2000 09:19:07 GMT Newsgroups: comp.lang.lisp * Tom Breton | Pardon my opinion, but multiple values are basically for when you have | code set in stone... noted as opinion. | IOW, values is basically a backwards-compatibility thing. it can definitely be used for this purpose, and may even have great value used this way, but I must admit that I never thought of values like that. values to me is a mechanism that removes the burden of agreeing on the aggregate form of the returned values. I guess this has to be explained in terms of how other languages deal with the same issue: multiple values are often expressed in C by passing a pointer to a structure in the caller's memory to be filled in by the callee. returning a structure is _still_ not kosher in the C world, and incompatibilities exist in how it is done. this affects how people return more than one value from their functions. in some cases, the caller needs to pass multiple pointers as arguments to be written to. Ada has a clean way to do this: with in and out arguments, the latter of which act just like multiple-value-setq. | When that's *not* the case, simply returning a list is better in every | way that springs to mind, IMO. since consing and destructuring both have very significant costs, I'd rate this is an insufficiency of things that spring to mind. #:Erik