ProtoObject and comparison for equality and ordering

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed May 15 00:11:36 UTC 2019


On 5/14/19 12:24 AM, H. S. Teoh wrote:
> Besides, realistically speaking, how useful is an AA that may contain
> any arbitrary class, where looking up one key might give you a GuiWidget
> but looking up a different key gives you a CryptoAlgorithm and looking
> up a third key gives you a GeometricShape?  I can't see how such a thing
> could be useful in any meaningful way.

Definitely meaningful. The key would be an object, not the value. There 
are many applications in which you'd want to associate data with a 
variety of objects.


More information about the Digitalmars-d mailing list