D1 operator overloads have been deprecated.

Gregor Mückl gregormueckl at gmx.de
Sun Oct 6 10:39:04 UTC 2019


On Sunday, 6 October 2019 at 08:34:40 UTC, uranuz wrote:
> Now user of language must actually have two sets of functions 
> with proposed workaround with classes. The final template 
> function and the old-style D1 (yes we can rename it and so on, 
> but this doesn't change so much). We should have two entities 
> instead of one that we had. So this is very "contradictive" 
> improvement.

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.


More information about the Digitalmars-d mailing list