Reddit: why aren't people using D?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Jul 27 13:59:42 PDT 2009


Lutger wrote:
> python: 
>   (x * x for x in xrange(10, 20) if x & 1)
> 
> D as of now:
>   map!("a * a")( filter!("a & 1")( range!(10,20) ) )
> 
> D with extension methods:
>   range!(10,20).filter!("a & 1").map!("a * a")
> 
> Not too bad right? 
> 
> (the range function is fictional, I forgot if and which one exists in 
> phobos) 

(It's called iota.)

Andrei



More information about the Digitalmars-d mailing list