return when desugaring to closures
Mark S. Miller
erights at google.com
Sat Oct 11 14:24:57 PDT 2008
On Sat, Oct 11, 2008 at 1:36 PM, Peter Michaux <petermichaux at gmail.com> wrote:
> (lambda (x = 3, y = x) (x+y))()
> to just
> let (x = 3, y = x) (x+y)
> makes it much more clear when reading code what the intention of the
> programmer was.
If the need for this case were common, that would be something. But
how often do cases come up for which the letrec-like let declaration
is not adequate? In hand written source, I think it's very rare. In
machine generated code, including explanatory expansions, it's quite
common. But these can use the lambda form without confusion.
More information about the Es-discuss