[R6RS] multiple-value binding

Michael Sperber sperber at informatik.uni-tuebingen.de
Thu Feb 16 08:37:05 EST 2006


dyb at cs.indiana.edu writes:

>  - I prefer 1 > 4 > 3 > 2.  

I believe SRFI 71 is basically a fusion between #2 and #4.  I prefer
all of #2, #3, and #4 (or SRFI 71) over #1, with no strong preference
for either of them.

I really dislike the discontinuity of LET-VALUES---finding that a
7-way LET has one clause with multiple values and having to go back
and wrap parens around everything.  I think the generality of
LET-VALUES is rarely needed.  If it's important, SRFI 71 shows how to
get it back.

>  - Whichever option we choose, I think we should include a let* variant
>    as well.

Yes.

>  - I'm less sure about letrec or letrec* variants.

Drop.

> Incidentally, a more radical proposal is to flush the 'dot' notation
> in favor of &rest (or just &).  Then it becomes straightforward to
> generalize option 3:
>
> 3g. (let ([idspec expr] ...) body)
>
>     idspec -> id | (id ...) | (id ... & id)
>
> If we were to go this route, I'd want to replace . with & in the syntaxes
> of lambda and define as well, and eliminate (lambda x body) in favor of
> (lambda (& x) body).

No.  We briefly discussed adopting your optional-argument proposal
from way back, and decided we didn't want to go there because we
didn't want to break old programs.  The same applies here, with less
potential gain from making the change.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla



More information about the R6RS mailing list