[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Earl Killian <eak@S1-B.ARPA>
- Subject: values-list
- From: "Scott E. Fahlman" <Fahlman@CMU-CS-C.ARPA>
- Date: Wed, 27 Mar 1985 23:50:00 -0000
- Cc: common-lisp@SU-AI.ARPA
- Comment: Remailed after delay caused by distribution list error at SU-AI.
- In-reply-to: Msg of 27 Mar 1985 14:10-EST from Earl Killian <eak at angband>
- Sender: 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.
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.
- From: David A. Moon <Moon@SCRC-STONY-BROOK.ARPA>