3 ms·
== and != are why Java should have operator overloading. The Java implementation of == for objects is utterly stupid. For objects that have a natural ordering
by russell 18y ago
== and != are why Java should have operator overloading. The Java implementation of == for objects is utterly stupid. For objects that have a natural ordering the rest of the comparison operators make sense.
I agree that you should not create nonsensical operators because you can, e.g. '*' for string replication, or '+' for sequence concatenation, although I have been guilty of that one myself.