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

Re: multiple values

    I didn't mean for my message to squelch debate.  Surely someone
    disagrees with me.  Speak up.

Ok, Jonathan.  I won't say much because I'm very busy right now.  The
message in question:

    As Alan has tactfully pointed out to me, none of the multiple-value
    features that Gary Brooks and Andy Freeman and I and others have been
    talking about bear much resemblance to CL multiple values, and they are
    really intended to solve a different problem.  The terminology is a
    problem here; we really shouldn't be saying that these constructs do
    "multiple value returns" because Lisp Machine Lisp and its derivatives
    (CL) have been using that term for quite a while to mean something quite
    different.  (I might have called the LM feature "extra value returns"...)
    We should no more think that we're "cleaning up something CL did wrong"
    than we should think that omitting optional or keyword arguments,
    or macros or packages, solves the problems that those features
    were introduced to address.

I see more of a resemblance than Jonathan does.  I happen to think that
CL came close to getting multiple values right, failing only in the choice
of primitives, the complexity of the specification (which, as someone has
observed, was due to the fact that CL doesn't do tail recursion right), and
in the over-reliance upon special forms (which is consistent with the rest
of CL).

The main difference between the RECEIVE/VALUES proposals I've seen and
the way CL does it is that people in the Scheme community seem to assume
that most continuations will require exactly one result, while in CL all
continuations accept any number of results (up to 20, anyway).  It seems
to me, however, that if you're going to have an efficient implementation
mechanism that supports continuations that accept an arbitrary number of
results, then it shouldn't be too hard to make all continuations accept
an arbitrary number of results.  Whether we do this or not should be
determined by whether we think CL got this part of it right.

    I like the idea of adding RECEIVE and VALUES to Scheme *without
    specifying what happens when some VALUES go somewhere other than to a

Me too.  For one thing, it makes it legal for a Scheme to implement
CL-style semantics for multiple values.

Peace, Will