@jamey i'm talking specifically about things like overloading existing infix operators rather than inventing new ones
my personal thoughts are that it only really makes sense if it's intuitive what the operator means in context
the canonical example for me is overloading + on vectors (the mathematical sense) to implement vector addition, and maybe overloading * on vectors for scalar and possibly matrix multiplication. in those cases it's clear what a + b means, so the code is nicer to read
@typhlosion Yes, I strongly agree with you that mathematical uses of operator overloading are Good and Right and should be Encouraged. 😁
I think there are other uses of infix operators that are also good, but the lines are much more fuzzy to me.
And then there's C++ << and >> to read or print data on streams, which I think is Very Bad. 😅
@jamey so if i want an affine transform aff(x) = Ax+b, i can just have the code say
A*x + b
instead of
A.mul(x).add(b)
or something more verbose and imo less clear