Lambda syntax for methods and functions
Craig Dillabaugh
craig.dillabaugh at gmail.com
Mon Dec 9 07:43:32 PST 2013
On Sunday, 8 December 2013 at 17:15:42 UTC, Jesse Phillips wrote:
> On Sunday, 8 December 2013 at 06:58:59 UTC, Marco Leise wrote:
>> But the verbose D syntax is just too distracting:
>> bool function(T a, T b) { return a > b; })
>
> I think you mean "the verbose D syntax:"
> (a, b) { return a > b; }
Maybe it is because I am a fast typer and a slow thinker, but I
kind of like somewhat verbose syntax (maybe not Java level
verbose, but still verbose). My brain can parse a statement with
words in it much faster than it can a mess of brackets and the
like. I am a human, not a compiler.
Heck if I was designing my own programming language I'd likely
have something like:
lambda(a,b) { return a > b; }
Plus I would have 'and' and 'or' instead of && and ||, just
because that has always bugged me.
More information about the Digitalmars-d
mailing list