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

[no subject]

I bring this up (again?) now only because of recent discussions
about multiple values and consing. If I could write
  (multiple-value-bind (&rest values) values-producer
    (cond ((test values) (values-list values))

a good compiler could recognize that there was no need to cons up a list
of values only to spread (a tail of) the list back onto the stack.

[Of course, this is NOT upward compatible with the current
multiple-value-bind, since the current one allows a mismatch
between the number of variables being bound and the number of
values being returned.  How did THAT find its way into the specification,
anyway?  I suppose its an attempt to reduce the need for
multiple-value-list when you don't know how many values might come back?]

The main objection I see to allowing a lambda list is with maintenance --
adding additional return values from a function F could invalidate calls
on F that were not prepared to accept (even if only to ignore) them.