[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Scott E. Fahlman <Fahlman@CMU-CS-C.ARPA>
- Subject: values-list
- From: David A. Moon <Moon@SCRC-STONY-BROOK.ARPA>
- Date: Thu, 28 Mar 85 13:36 EST
- Cc: Earl Killian <eak@S1-B.ARPA>, common-lisp@SU-AI.ARPA
- In-reply-to: <FAHLMAN.12098479109.BABYL@CMU-CS-C.ARPA>
Date: Wed, 27 Mar 1985 19:50 EST
From: "Scott E. Fahlman" <Fahlman@CMU-CS-C.ARPA>
A useful extension to values-list would be to make it take multiple
arguments the way apply does, i.e. all but the last are values to
return and the last is a list of further values to return.
What's wrong with (APPLY #'VALUES-LIST A B C L)?
You can easily get the effect you want with a macro, as long as you're
willing to cons all the returned values into a list at some point. I
guess your point is that sometimes you don't know how many values to
expect, but would like to handle the first few without consing via
values-list. Multiple-Value-Call with a &rest arg gives you this
effect, but forces you to do a function call that might be superfluous.
So there is a niche for your proposed mechanism, but I don't think it's
a common enough situation to worry about. The only cases I've seen
where you don't know how many args are coming back would not be bothered
by the overhead of the function call or the values-list; in the tense
cases, you generally how many args to expect.
This discussion appears to be about MULTIPLE-VALUE-LIST.
- From: "Scott E. Fahlman" <Fahlman@CMU-CS-C.ARPA>