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

Re: An alternate description of the multiple values proposal



I have a disagreement with Will's description of the consensus.  He says,
``Except for continuations created by the procedure to be named later, all
continuations take exactly one value, as now''.  I firmly believe that
continuations for the ``for effect'' context should take any number of
arguments; I would very much not like to see this left unspecified.

I agree with Jinx's correction to my description of CALL-WITH-VALUES
(stating that the producer accepts zero arguments instead of insisting that
it be a procedure of exactly zero arguments).

John, I appreciate that you were responding to my concerns when you removed
the special-casing from the description of VALUES, but that was not the
greatest of my concerns.  My major issues concern some added degree of
precision in the description and also a statement about the arity of ``for
effect'' continuations.  That's why I felt the need to propose a different
description.  Let me respond to your comments on that decription.

You say, ``I think that the BABY-DOE procedure should include text that
makes it clear what happens when the continuation given to the producer is
captured by CALL-WITH-CURRENT-CONTINUATION.''

I thought the combination of the statements ``Consumer is applied to the
value(s) returned by invoking producer.  CALL-WITH-VALUES returns the
result(s) of the invocation of consumer.'' and the discussion of the sixth
context in the description of CALL-WITH-CURRENT-CONTINUATION made it clear
what happens.  If not, could you suggest a sentence or two that improves
the situation?


On the subject of naming BABY-DOE, consider the only procedures in R3.95RS
whose names begin with ``WITH-'':

	WITH-INPUT-FROM-FILE
	WITH-OUTPUT-TO-FILE

Both of these have an effect with dynamic extent, and the ``body''
procedure in each case is a thunk.  Thus, the effect of these procedures is
to do some magic that lets the bodies behave differently than they would
without the procedure.

On the other hand, the procedures with ``CALL-WITH-'' in their names are as
follows:

	CALL-WITH-CURRENT-CONTINUATION
	CALL-WITH-INPUT-FILE
	CALL-WITH-OUTPUT-FILE

These all take a ``body'' procedure and zero or one other arguments.  A
computation is done on the other arguments and the result is passed as an
argument to the body procedure.  No dynamic extent magic is involved and
the context of the body is no different than what it would be if it were
not an argument to one of these procedures.

I think that the resemblence of BABY-DOE to the latter set of procedures is
quite strong and that the resemblence to the former set is quite weak if it
exists at all.  Thus, on the grounds of consistency in naming, I support
CALL-WITH-VALUES.

	Pavel