[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [srfi-11] LET-VALUES wrapup (was: Re: Another vote for more parens)
lth = Lars Thomas Hansen <lth@xxxxxxxxxxx>
eh = erik hilsdale <ehilsdal@xxxxxxxxxxxxxx>
eh> (let-values ((IDENTIFIER EXP)) BODY)
eh> ==> (let ((IDENTIFIER EXP)) BODY)
eh> or, equivalently
eh> (call-with-values (lambda () EXP) (lambda (IDENTIFIER) BODY))
lth> Holy cow, absolutely not!
lth> (let-values ((I E)) BODY)
lth> ==> (call-with-values (lambda () E) (lambda I BODY))
lth> There is only one case: any <formals> is allowable, and does
lth> exactly what you would expect. I thought I was clear about
lth> this but I guess I must not have been. The proposed expansion
lth> above is in any case not allowed by the Report.
lth> There is nothing profound about my spec for LET-VALUES. It is
lth> merely sugar that aims to improve readability of programs (by
lth> removing the use of CPS introduced by CALL-WITH-VALUES). Among
lth> other things I want to be able to capture all the returned
lth> values in a list. Mike (and maybe Dave, I can't tell) wants to
lth> perserve the equivalence of (values 1) and 1 when
lth> destructuring; I don't mind that, but it competes with the
lth> ability to capture all values, which I value much more highly.
Sorry for the misunderstanding (or, really, the misattribution). I
was summarizing what Mike-and-maybe-Dave (*smile*) seemed to be aiming
for. As I poorly communicated in the rest of the message, I'm all for
the non-profound LET-VALUES.
(let-values ((FORMALS EXP) ...) BODY)