D1 operator overloads have been deprecated.

Gregor Mückl gregormueckl at gmx.de
Sun Oct 6 16:01:29 UTC 2019


On Sunday, 6 October 2019 at 12:28:57 UTC, uranuz wrote:
> On Sunday, 6 October 2019 at 10:39:04 UTC, Gregor Mückl wrote:
>> You only need this workaround if you habe a class hierarchy 
>> where overloaded operators are
>> overridden in subclasses. This is a very narrow set of cases. 
>> Otherwise, implementing only the D2 way is sufficient. How 
>> often do you actually need to override operator behaviour in 
>> subclasses? I'm genuinely curious about use cases.
>
> Personally, I have several places in my code where I need to 
> add `in` into basic interface and implement it in derived 
> classes. It is not some "weird", "narrow" set of cases, I 
> believe.
> For instance, I have different implementations of `in` in all 
> of these classes.

What is your use case for an in operator that changes in derived 
classes?


More information about the Digitalmars-d mailing list