too much sugar not good for the health

Andrei Alexandrescu (See Website For Email) SeeWebsiteForEmail at erdani.org
Wed Mar 21 11:51:55 PDT 2007


Stewart Gordon wrote:
> Andrei Alexandrescu (See Website For Email) Wrote:
> 
>> Stewart Gordon wrote:
>>> Andrei Alexandrescu (See Website For Email) Wrote:
>>>> We definitely should get rid of the shameful .sort and 
>>>> .reverse though.
>>> What is shameful about them?
>> They should be free functions,
> 
> What do you mean?
> 
>> and sort should also allow a predicate.
> 
> If you mean a comparator, it's been said already.  But how would getting rid of it fix that problem?

The problem is that reverse and sort should be, as in STL, algorithms 
decoupled from the container they work on.

Andrei



More information about the Digitalmars-d mailing list