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