[R6RS] summary of decisions regarding multiple values

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


I have received oral reassurances on this point several
times, but I want to put this summary into the written
record of our discussions, especially since the written
record is so confusing on this issue.  Furthermore the
people who are revising the formal semantics need to be
careful about this.

The current draft of the status report affirmed support
for multiple values and also notes this change from R5RS:

    Continuations created by begin must accept any number
    of values. (This was optional in R5RS.)

In our conference call of 26 April 2006, we considered
(but later rejected) the possibility of requiring certain
procedures to return 0 values.  The minutes of that
discussion noted that:

    returning 0 values might seem awkward for A-normal form,
        but A-normal form already has this problem with calls
        to unknown procedures; so long as implementations are
        allowed to coerce 0 or more than 1 return value into
        a single return value, A-normal form will still work

On 17 May 2006, we voted as follows:

42.  If zero values or more than one value are returned
    to a continuation that requires one value, then it
    (must/should/may/might/returns/abstain/discuss)

    Vote: should, must, must, should, must

    Outcome: must

    raise an exception with
    condition type: &values

What this vote left unanswered is the question of which
continuations require one value.  As I understand it:

 *  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.

Will



More information about the R6RS mailing list