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

Kent, please bless this multiple values proposal.



I believe I have a multiple values proposal acceptable to all.  Given
the history of the Snowbird meeting, I ask you, Kent, to vote on this
proposal before I submit it to the rest of the authors.  The essence
of the compromise is that we leave unspecified the effect of returning
zero values or more than one value to something other than a receiving
procedure.  This means implementations may or may not signal an error
in this case, and both kinds of implementations are considered equally
correct.  In an effort to reach compromise, others have given up their
requirement that some procedures such as ACCEPT? be included.  In the
spirit of compromise, I hope you will give up your requirement that an
error may be signaled when a continuation expecting one value receives
one value from VALUEs.

John

--------------------------------

(values obj ...)                                        essential procedure

Returns 0 or more values to a receiving procedure (See with-values).

        (values)        =>              returns zero (no) values

        (values 1)      =>              returns a single value, 1

        (values 1 'a) 	=>              returns two values, 1 and the symbol a

Values applied to one argument simply returns its argument.  The
effect of returning zero values or more than one value to something
other than a receiving procedure is unspecified.

(with-values generator receiver)      			essential procedure

Returns the result of applying the procedure 'receiver' to the values
produced by calling procedure 'generator' with no arguments.  It is an
error if 'receiver' cannot be applied to the number of values returned
by 'generator' or if 'generator' cannot be called with zero arguments.

        (with-values 
          (lambda ()
            (values 1 2))
	  cons)   	      =>              (1 . 2)

--------------------------------