It's important to note that numerical calculation is a domain particularly suited to operator overloading simply because the underlying domain (math) already uses operator overloading heavily (e.g. multiplication means something different when done on scalars and vectors, but in both cases it is well defined and in common usage).
You should leave out the 'overloading':
- Math (and it's very close relative logic) are the only domains that use operators, period.
- other domains use overloading; homonyms are very common.
Which leads us to that ugly a.equals(b) instead of sane a == b. When not abused, operator overloading is a bless.
Except that a == b and a.equals(b) are two different things.
As it stands you can't in Java but you can in C#, although it's usually a really bad idea.
My comment only applies for Java - I don't know C#. As you say, it's usually a bad idea but it's quite reasonable to do for numerical analysis, as your sibling comment says.
Dude, you can't overload operators in Java. You can overload methods of a class, but not operators. Operator overloading means that you can overload '+' for example for your particular class, which would enable you to write code like (in Java):
You can't do that, so you would have to write: Which makes your code verbose and makes Java (and Go) painful for doing numerical analysis.