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


>From: Don Morrison <dfm@jasper.palladian.com>
>What are the semantics of MULTIPLE-VALUE-OR?   ...

It should be the same as OR, but return multiple-values.  Since OR only
conditionalizes on the first value, MULTIPLE-VALUE-OR does the same,
but returns all the rest of the values as well.
As standard with multiple-values, when less than asked for are returned, 
the extra are filled out with NIL's, so no-values is the same as a NIL value.

>I think more to the heart of the matter is that Common LISP needs a way to grab,
>inspect, and pass on an unknown number of multiple values without consing
> (and yes, avoiding consing can be crucial for real applications
> give the current state of the art for garbage collection
> on conventional hardware).  It's possible that, using
>multiple-value-call, simply having some way of 
>doing non-consing &rest arguments may be sufficient.   ...

I whole-heartly agree that A) Unneccessary consing should always be avoided,
 B) it would be great to have &rest args that don't cons.
I currently have plans to have a STACK-LIST declaration that declares that
a &Rest is stack-allocated (as well as WITH-STACK-LIST, ala Lisp Machines)
in my system.  I would suggest that others consider this as well, but
of course, it is only a declaration that could be ignored.
(I already avoid consing for (&Rest ignore), which should be easy).

My point is that MULTIPLE-VALUE-OR can only be done efficiently by low-level
implementation-specific code, and thats why it should be in Common Lisp.

- Kelly Edward Murray
  University of Massachusetts, Amherst