too much sugar not good for the health

Sean Kelly sean at f4.ca
Wed Mar 21 14:03:03 PDT 2007


Andrei Alexandrescu (See Website For Email) wrote:
> Stewart Gordon wrote:
>> Andrei Alexandrescu (See Website For Email) Wrote:
>> <snip>
>>> We definitely should get rid of the shameful .sort and .reverse though.
>>
>> What is shameful about them?
> 
> They should be free functions, and sort should also allow a predicate.

I agree.  But until then, adding such free functions fortunately does 
not conflict with the built-in properties so long as the free functions 
require parameters.  For the record, Tango has a predicate-based sort 
routine in tango.core.Array.  It currently performs about the same as 
the built-in routine.


Sean



More information about the Digitalmars-d mailing list