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

Multiple values

I do not see any need for anything other than
some thing like the T version of multiple values.
That is RECEIVE-VALUES, RETURN (possibly called
VALUES), and the macro RECEIVE.  

It would be nice if escape procedures can be applied
to a variable number of arguments, so that the following
would work:

  (lambda (x y) (list x y))
     (lambda (k) (k 1 2))))		=> (1 2).

but given how often call-with-current-continuation is
used, I think we should be content to pass back list
structure in those rare cases.

I strongly object to Gary Brook's proposal for multiple
values.  The idea of adding a new data structure
smacks of a case of reading the semantic specification
of Scheme too literally.  Using sequences as arguments
to expression continuations is a trick to get around
the fact that functions only take one argument in the
lambda calculus.  The T experience shows that trick
is not needed in real implementations.  

The most serious objection I have to Gary Brook's
proposal was the design philosophy that is implicit
in the proposal.  There seemed to be no attempt to
explain why his proposal had any merit over the much
simpler version as proposed by Will Clinger.  Any proposal
to solve one single language problem with a large addition of 
functions and macros must be accompanied by an explanation.
While such proposals may be the norm in the Common Lisp
community, we must all remember that the Scheme report
starts its introduction with the words "Programming languages
should be designed not by piling feature on top of feature,
but by removing the weaknesses and restrictions that make
additional features appear necessary."