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

[no subject]

This page is part of the web mail archives of SRFI 11 from before July 7th, 2015. The new archives for SRFI 11 contain all messages, not just those from before July 7th, 2015.

>Holy cow, absolutely not!
>        (let-values ((I E)) BODY)
>        ==>  (call-with-values (lambda () E) (lambda I BODY))
>There is only one case: any <formals> is allowable, and does exactly
>what you would expect.  I thought I was clear about this but I guess I
>must not have been.  The proposed expansion above is in any case not
>allowed by the Report.
>There is nothing profound about my spec for LET-VALUES.  It is merely
>sugar that aims to improve readability of programs (by removing the use
>of CPS introduced by CALL-WITH-VALUES).  Among other things I want to be
>able to capture all the returned values in a list.  Mike (and maybe
>Dave, I can't tell) wants to perserve the equivalence of (values 1) and
>1 when destructuring; I don't mind that, but it competes with the
>ability to capture all values, which I value much more highly.

In addition, taking as example the 'floor' function of Common Lisp:
(floor 5/3) -> 1, 2/3
(values (floor 5/3)) -> 1

So "(values x) = x" does not appear to be an identity. Therefore, I
accept Lars' syntax with multiple bindings allowed, as allowing the single
binding case only is redundant with SRFI-8.

P.S. Regarding LET-type forms, I think SRFI-5 erred in having the rest
argument not bindable to a single list. The example's first line, under my
interpretation, would be:
(let (blast (port (current-output-port)) . (x (list (+ 1 2) 4 5)))