toHash => pure, nothrow, const, @safe

Martin Nowak dawg at dawgfoto.de
Tue Mar 13 10:55:44 PDT 2012


On Tue, 13 Mar 2012 04:40:01 +0100, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> I think the three others have a special regime because pointers to them  
> must be saved for the sake of associative arrays. toString is used only  
> generically,
>  Andrei

Adding a special case for AAs is not a good idea but
these operators are indeed special and should have
a defined behavior.
Requiring pureness for comparison for example is good
for all kind of generic algorithms.


More information about the Digitalmars-d mailing list