A Fresh Look at Comparisons, Take 2

Janice Caron caron800 at googlemail.com
Fri Apr 18 10:31:56 PDT 2008


On 18/04/2008, Steven Schveighoffer <schveiguy at yahoo.com> wrote:
>  >>  >>  You need to have opEquals in Object in order to support hashing.
>> > Please could you elaborate, as I don't understand why this is so?
> ...
>  It is not necessary in Object

Ah! That would explain why I didn't understand why it was so! :-)

I am confused about one point though. I know that one can implement an
AA using hashing. I also know that one can implement an AA using
comparison. However, it seems to me that one does not need /both/. How
are D AA's implemented - do they use hashing, or do they use
comparison? And why do the docs say we need both?



More information about the Digitalmars-d mailing list