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

Kent, please bless this multiple values proposal.



   Posted-From: The MITRE Corp., Bedford, MA
   X-Alternate-Route: user%node@mbunix.mitre.org
   Posted-Date: Mon, 28 Aug 89 07:30:00 EDT
   From: ramsdell@linus.mitre.org
   Date: Mon, 28 Aug 89 07:30:00 EDT

   I believe I have a multiple values proposal acceptable to all.  

   (values obj ...)                                        essential procedure

   ...

   The effect of returning zero values or more than one value to something
   other than a receiving procedure is unspecified.

I believe that the sentence above leaves things a little too unspecified.  In
particular, I believe that it is important that in the following code CONT
accept exactly two values.

	   (with-values 
             (call-with-current-continuation
              (lambda (c)
               (set! cont c)
               (values 1 2)))
             cons)

Similarly, any continuation captured with CALL-WITH-CURRENT-CONTINUATION which
tail recurses into the first argument position of WITH-VALUES should require
and exact arity match with the receiver.

-------------------------------------------------------------------------------
Morry Katz
katz@polya.stanford.edu
-------------------------------------------------------------------------------