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

Re: Multiple values for R4RS



>> From: R. Kent Dybvig <dyb@iuvax.cs.indiana.edu>
...
>> I now see that there is some value in requiring "(values e)" to be the
>> same as "e", even in the absense of the infamous "truncation" feature.
>> There is also some value in requiring (or allowing) "(values e)" to be
>> distinct from "e".  I see the latter as simpler, not more eomplex, both
>> in terms of the semantics and in terms of the implementation.  However,
>> as I said at Snowbird, I am willing to defer to the judgement of the
>> majority on this issue.
>> 
>> Kent

This confirms my hope that there is good chance we can reach agreement
on the subject of multiple values for R4RS.  Let me point out that if
agreement is reached soon enough, multiple values could be made part
of IEEE Draft Standard for the Scheme Programming Language.

Before I submit the proposal, I ask for editorial suggestions,
especially to the sentence:

  Within procedure 'generator', the initial escape procedure returned 
  by call-with-current-continuation is like 'receiver' except that 
  this escape procedure's continuation is the one that was in effect 
  when the evaluation of the with-values expression began (see
  call-with-current-continuation).

How about this?

  When procedure 'generator' is called, capturing its initial continuation
  with call-with-current-continuation produces an escape procedure which
  is like 'receiver' except that this escape procedure's continuation
  is the one that was in effect when the evaluation of the with-values
  expression began (see call-with-current-continuation).

Here is attempt at the changes required in
call-with-current-continuation.

Replace the last sentence in the first paragraph with:

  The escape procedure is a Scheme procedure which when called, will
  ignore whatever continuation is in effect at that later time and will
  give its arguments to the continuation that was in effect when the
  escape procedure was created.  Within a with-values expression, the
  arity of the escape procedure which packages the continuation in
  effect when the generator is called must match that of the receiver.
  All other escape procedures must accept at least one argument.  Some
  implementions may choose to ignore extra arguments, others may signal
  an error when more then one argument is given.

John