what about dropping rest-lists? Neil W. Van Dyke (16 May 2005 20:44 UTC)
Re: what about dropping rest-lists? felix winkelmann (17 May 2005 06:35 UTC)

what about dropping rest-lists? Neil W. Van Dyke 16 May 2005 20:44 UTC

When thinking of single-value return as just a case of multiple-value
return, I like the clean syntactic symmetry between:

    (let ( (a     (foo)) ) ...)

and:

    (let ( (a b c (bar)) ) ...)

The "values" keyword as a kludge to support rest-lists, however, strikes
me as a syntactically ugly way to support an operation that I'd expect
to use only rarely.

If rest-lists are to be supported, I'd like a cleaner syntax.  What that
syntax should be, I have no good suggestion.  The historical syntax of
the single-value binding clause of "let" precludes good syntactic
symmetry with "lambda"'s argument syntax, and it also adds extra parens
to the most common case, which is a single-value binding:

    (let ( ((a)     (foo)) ) ...)
    (let ( ((a b c) (bar)) ) ...)
    (let ( (x       (bar)) ) ...)

In summary, I'd really like to see "let", "let*", "letrec", and
"letrec*" extended for multiple-value, but would like to drop the
"(value ...)" syntax, even if that means dropping rest-list support.

--
                                             http://www.neilvandyke.org/