std.array suggestion

Oskar Linde oskar.lindeREM at OVEgmail.com
Thu Mar 9 06:13:17 PST 2006


Ivan Senji wrote:
> Oskar Linde wrote:
> 
> ...
> 
> Totally agree that something like this (and more) should be in the 
> standard library.

Please elaborate on (and more).

>> Upon rereading, I realized that the inplace versions should be void 
>> functions - not returning an array.
> 
> Not sure about this one. Returning an array allows chaining:
> 
> array.doMap(someDelegate).doSort();

Yes, but void removes the chance of using inplace versions by mistake 
and makes it extra obvious that they are not ordinary functions. I think 
this is more important than the ability of chaining.

/Oskar



More information about the Digitalmars-d mailing list