ProtoObject and comparison for equality and ordering
Adam D. Ruppe
destructionator at gmail.com
Wed May 15 00:58:50 UTC 2019
On Wednesday, 15 May 2019 at 00:54:20 UTC, Andrei Alexandrescu
wrote:
> 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.
Yes, I agree with this.
I think the opCmp discussion should be moot, as a ProtoObject
should not be comparable anyway; it'd simply be a compile error
to try. Just like with trying to call any other method on it, you
need to explicitly cast it to some interface you've defined first.
More information about the Digitalmars-d
mailing list