Full closures for D
Simas
simas at gmx.net
Wed Nov 7 07:43:50 PST 2007
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.
More information about the Digitalmars-d
mailing list