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

Multiple values for R4RS.



   From: ramsdell@linus.mitre.org
   Date: Mon, 21 Aug 89 08:15:36 EDT

   Maybe there is enough consensus to allow agreement on the
   non-controversial aspects of multiple values for R4RS.  What do people
   think about adding only VALUES and APPLY-VALUES?

I'm not sure how this circumvents the "controversial" aspects.  As I
understood it, the controversy had to do with the semantics of how
VALUES interacted with the continuation in effect where it was called.

   [...]

   (apply-values receiver generator)

I've been using a similar interface for multiple values for about a
year now, the major difference being that instead of `apply-values'
there is an operation `with-values' which has these two arguments in
the opposite order.  I think the order of arguments is somewhat
important: `with-values' orders the generator and receiver so that
they are executed in the same order in which they appear
(left-to-right), while `apply-values' executes them in the opposite
order.  I think `with-values' is significantly easier to read; I'd
favor having the arguments appear in that order, even though it screws
up the "generator arguments" extension (sorry, I don't find that
extension very interesting).  This is (at least part of) the same
reasoning that makes `let' easier to read than its `lambda' expansion.