Am 20.03.2011 18:36, schrieb bearophile:

It has List Comprehensions (I have kept the Archetype syntax here):

var FirstHundred = [ 1..100 ];

var FirstHundred = from x in [ 1..100 ] where x*x>  3 select x*2;


Isn't this plain LINQ like in C#? Maybe the [1..100] is new, but the rest isn't, I think.


In my opinion the map/filter/reduce of Phobos2 have almost failed because their 
syntax is too much noisy and heavy, I don't want to see them used a lot in 
production code. Even in Python code map/filter/reduce are uncommon. Modern 
Python programmers use mostly lazy/eager sequence comprehensions. But I don't 
like the List Comprehensions syntax of Archetype.

Having something like LINQ as syntactic sugar for (algorithms on) Ranges in D would be cool.

Cheers,
- Daniel

Reply via email to