Re: [srfi-11] LET-VALUES wrapup (was: Re: Another vote for more parens)
Dave Mason 05 Jan 2000 14:50 UTC
>>>>> On Wed, 05 Jan 2000 09:15:23 -0500, Lars Thomas Hansen <xxxxxx@ccs.neu.edu> said:
> You are suggesting that if E returns a single value v, then
> (let-values ((I E)) ...)
> would bind I to v, rather than binding I to (v) as I would have it,
> and that if E returns other than one value, the program is in error.
> (The alternative in the latter case is that it means something
> _different_ in that case, e.g. binding I to the list of values, but
> I don't think anyone believes that is a good idea.)
I agree.
> I'm not sure what your change buys us,
One thing it *could* buy is to simply use the existing names: let,
let*, letrec to handle multiple values too. I don't have an opinion
as to whether this would be a good thing or not.
> but it removes the ability to
> capture all returned values as a list.
For this (I think) rare case,
(let-values (((. I) E)) ...)
would seem to me to do the trick (although it might break some readers).
../Dave