Overloading relational operators separately; thoughts?
Sai via Digitalmars-d
digitalmars-d at puremagic.com
Thu Sep 29 09:41:47 PDT 2016
> I.e. you can overload '+' to do bad things. Yes, you can, and
> as I replied upthread that can be done because there's no way
> to prevent that while having operator overloading at all.
>
> But that is not justification for allowing such disasters for
> the comparison operators. I.e. one weakness is not
> justification for opening the door to all weakness.
If I understand the issue correctly, one will not be able to
overload <=, >, etc for symbolic math, like CAS (mimicking
mathematica for example), how can I do it now?
Wouldn't the current rules discourage someone from implementing
CAS like library in D?
More information about the Digitalmars-d
mailing list