ProtoObject and comparison for equality and ordering

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed May 15 00:54:20 UTC 2019


On 5/14/19 1:52 AM, Adam D. Ruppe wrote:
> On Wednesday, 15 May 2019 at 00:37:25 UTC, Andrei Alexandrescu wrote:
>> Thanks. Looks like that's the price if we want to support unordered 
>> objects.
> 
> But DO we want to support unordered objects?

In the rather general context of classes, it would be quite desirable.

The nice thing is if we opt for a statically-checked solution the user 
will be able to make a decision on the signature of opCmp in their base 
class, and then go with it. Different hierarchies may even support 
different flavors of comparisons.


More information about the Digitalmars-d mailing list