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

Re: An alternate description of the multiple values proposal



   Date: Fri, 1 Sep 89 16:55:00 edt
   From: cph@zurich.ai.mit.edu (Chris Hanson)
   
   I'm not sure I agree with this definition of "for effect"
   continuations.  I do agree that they should be required to accept
   either zero arguments (because that is the "correct" arity for a
   strict semantics) or one argument (for compatibility with existing
   code).  However, I see no compelling reason why such continuations
   should be required to accept more than one argument.  I would prefer
   to leave this unspecified, because I believe it is an exact parallel
   with the case of "for value" implicit continuations accepting more
   than one argument.

After sending my note, I took a look at the current (R3.95RS) semantics.
It shows a continuation for ``commands'' (that is, expressions in
``effect'' context) that takes any sequence of values and ignores all of
them.  Of course, the formal semantics has no weight, but I found it
interesting.

I think that I have always been bothered by languages (like Pascal and
Mesa) that require me to ``do'' something with the returned values of
procedures.  It always seems to me that I already explained what to do with
them: ignore them.  Thus, I don't quite agree with the feeling that zero
values is somehow the ``correct'' number for expressions in effect context.
I can, however, appreciate something of the general gestalt that gives you
that feeling.

I think that my major reason for wanting effect continuations to accept
many values is for consistency with single-value-returning expressions; I
don't see a compelling reason to distinguish the two unnecessarily.  It
would seem weird to me if single-valued expressions somehow got preference
over multiple-valued ones in such a case, in which there appears no
semantic justification.

	Pavel