www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Full closures for D

Janice Caron Wrote:

 D is C-like, ...

The D Language is : "Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python". This does't exclude a productiv language like perl.
 However, I think it would be nice to get rid of the
 delegate type declaration altogether and git ourselves an implicit
 delegate argument

Generally speaking, I don't. Although that said, D already supports variadic functions, so one could declare a function as accepting a tuple, and then refer to the arguments as tuple[n]. I do not believe this would increase readability, however, in cases where functions are not actually variadic!

I think this is a helpful feature.
     auto base = "/path/to/dir/";
     auto absoluteDirs = map({ return base ~ $0; }, readdir(DIR));

Yuk! Dollar zero? Yuk! Yuk! Yuk! Please, no!

Once again. Really nice.
Nov 07 2007