[racket] future
I want to be able to:
#lang racket/L ; sacrifice L in honor of profoundly useful lambda
rac
On Aug 29, 2011, at 3:36 PM, Greg Hendershott wrote:
>> it wouldn't be necessary to create all these duplicate forms to avoid
>> writing (lambda () ...) This would cut down on code, and also make the
>> language more consistent.
>
> I think Noel has it exactly right.
>
> The common concept is "thunk".
>
> The desire is, how to say it more succinctly.
>
> Surely there should be one way to say it more succinctly, which works
> with many forms? As opposed to many forms each needing its variation
> to say the one thing more succinctly?
>
>
> So: How to say it more succinctly than (lambda () e)? Or even the
> i-can-haz-unicode way, (λ () e)?
>
> (thunk e) is a first approximation. But, "thunk" is jargon, and it's
> barely more succinct than (lambda () e).
>
> So, how about any of these as the super succinct way:
> (() e)
> (\ e)
> (λ e)
>
> ??
>
> Actually I'm fine with (lambda () e) or (λ () e). I don't think a
> couple extra parens are horrible, or I'd be writing C# or
> cortex-fudge. And I don't think it's horrible for functions to be
> first-class, and to express "here's some stuff to do" as "here's a
> function".
>
> 2011/8/29 Noel Welsh <noelwelsh at gmail.com>:
>> On Mon, Aug 29, 2011 at 8:05 PM, Eli Barzilay <eli at barzilay.org> wrote:
>>> There's also the semi-popular syntax extension change, like {E ...}
>>> expanding to (λ () E ...), but that looks very confusing with
>>> something like (thread {(printf "foo\n")}) -- so maybe do that with
>>> the outer form: {thread (printf "foo\n")}. Or maybe do that with a
>>> macro instead: (e thread (printf "foo\n")), which will probably go the
>>> way of `nested'.
>>
>> Yeah, what about solving the problem of lambda's verbosity directly?
>> If fn or \ was shorthand for lambda, or
>>
>> { a1 ... | expr ... }
>>
>> expanded to
>>
>> (lambda (a1 ...) expr ...)
>>
>> it wouldn't be necessary to create all these duplicate forms to avoid
>> writing (lambda () ...) This would cut down on code, and also make the
>> language more consistent.
>>
>> N.
>>
>> _________________________________________________
>> For list-related administrative tasks:
>> http://lists.racket-lang.org/listinfo/users
>
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users