std.array suggestion

Ivan Senji ivan.senji_REMOVE_ at _THIS__gmail.com
Thu Mar 9 06:02:43 PST 2006


Oskar Linde wrote:

...

Totally agree that something like this (and more) should be in the 
standard library.

> 
> 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();

...

> 
>> I like it.  It would be especially cool if we could get rid of the 
>> necessary () after each call when using property syntax, thus making 
>> truely plugable properties. 
> 
> 
> Yes, I agree. I would like to know if all pairs of empty parentheses 
> after functions are supposed to be redundant or if calls without 
> parentheses should be reserved to property like methods. Considering the 
> current .sort and .reverse semantics, I guess the former is the case and 
> DMD not allowing calls without parentheses for implicit array methods is 
> an unintentional omission.
> 
> /Oskar



More information about the Digitalmars-d mailing list