A nice way to step into 2012

Jonathan M Davis jmdavisProg at gmx.com
Tue Dec 27 16:19:52 PST 2011


On Tuesday, December 27, 2011 14:07:25 Jakob Ovrum wrote:
> And it is indeed very important. It's one of the few syntax woes
> we have to deal with in D, it would be a shame to let the
> benefits of std.algorithm and any other functional D code be
> overshadowed by the powerful but often excessive syntax of
> anonymous functions.

I find this sort of discussion to be somewhat funny. I don't think that it's a 
problem that D has added a new lambda syntax, but what we've had _so_ much 
better than C++ 98 that I never really cared. Sure, putting the return in 
there and all that is a bit verbose, but at least we have lambdas! I almost 
never use the algorithms in C++, because you have to define separate functors 
elsewhere. You don't even get nested functions! So, I've never seen much 
reason to complain about D's verbose lambda syntax, because it's so nice to 
have what we have rather than be forced to create functors and the like.

So, this is certainly a welcome change, but I've also found it kind of odd 
that some people have been complaining about it so much. Most of them probably 
aren't C++ programmers.

- Jonathan M Davis


More information about the Digitalmars-d mailing list