Lambda syntax, etc

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Feb 5 08:13:27 PST 2009


grauzone wrote:
>> What I see above is a smörgåsbord of syntaxes that shoot all over the 
>> proverbial barn door in the hope that one of them would strike 
>> someone's fancy. That strikes me as a rather lousily done job. Also, 
>> it is my 
> 
> I find this statement rather ironic, because you also seem to be quite 
> happy with your code-as-string-literal approach.

I do understand you dislike strings as lambdas, but please do not use 
that dislike as a presupposition of a truth.

Besides, there is no correlation. D offers two syntaxes, a decent lambda 
syntax (that is being improved) and a string syntax for short 
predicates. They have clear and distinct tradeoffs and charters. In 
contrast, C# seems to have decided to allow pretty much all syntax 
variations that parse unambiguously. You can only wonder what C#4 has in 
store.

> Your approach doesn't 
> even enforce any syntax, instead, everyone is free to invent his own.

There's only so many ways to write an expression involving one or two 
given symbols.


Andrei



More information about the Digitalmars-d mailing list