[R6RS] summary of decisions regarding multiple values

William D Clinger will at ccs.neu.edu
Wed Jun 21 13:13:37 EDT 2006

Mike wrote:
> >  *  Continuations created by begin must accept any number
> >     of values [status report].
> >
> >  *  Continuations created to evaluate an argument may
> >     require exactly one value, but are also free to
> >     accept more than one value, ignoring all but the
> >     first [R5RS, minutes of 26 April].
> >
> >  *  Continuations created to evaluate an argument may
> >     require exactly one value, or may require at least
> >     one value, but are also free to accept zero values
> >     by some ad hoc coercion, e.g. to the unspecified
> >     value [R5RS, minutes of 26 April].
> >
> >  *  The only continuations that are actually required
> >     to accept exactly one value are the continuations
> >     created by the call-with-values procedure when its
> >     second argument is a procedure that requires exactly
> >     one value.
> >
> > If anyone believes the above to be an inaccurate summary
> > of what we have decided, please speak up.
> I agree we explicitly decided #1.  You described #2 and #3 during the
> phone conference, and nobody spoke up against it, but I don't believe
> we made an explicit decision on it.  #4 is news to me.

Then we really need to discuss this.  If the R6RS were
to forbid command continuations from behaving the same
as argument continuations, it would break a great many
examples from the research literature, and would create
nightmares for compiler writers who have based their
optimizations on that literature.

If the editors are going to require non-checking for some
continuations, while requiring checking for others, then
the editors have an obligation to specify precisely which
continuations are required to check, and which are required
not to check.

Furthermore the editors will have an obligation to explain
why they want to require sloppiness in some contexts but
forbid that same sloppiness in others.  A lot of people are
unhappy about multiple values anyway, and would regard this
inconsistency as irrational and arbitrary.  Even I would so
regard it, even though I like multiple values and use them
extensively in my compiler.

Kent wrote:
> By my interpretation of exceptions item #42, we were effectively
> changing this sentence to read something like this:
>  If zero values or more than one value are passed to a continuation
>  not created by {\cf begin} or {\cf call-with-values}, an exception
>  must be raised with condition type &values.

That was certainly not my interpretation, and I remember
asking for clarification of that very point during our
conference call discussions of that item.

Kent's interpretation would *require* every implementation
to distinguish three different kinds of continuations, two
of which are extremely common.  In many systems---probably
most---it would add overhead to every non-tail call.  It
would be an extremely silly thing to do for no reason at
all, which is all the reason I've heard so far.


More information about the R6RS mailing list