4 ms·
The only time you can expect the `+` operator to do simple addition is when you're working with numeric primitives. If I instantiate two strings and add them wi
by bccdee 6y ago
The only time you can expect the `+` operator to do simple addition is when you're working with numeric primitives. If I instantiate two strings and add them with `+`, I'd better understand that I'm calling an overloaded operator -- what else could I possibly think I'd be doing there?
So I really don't agree that operator overloading is misleading -- that's only true if you ignore underlying data types. By this logic, any form of polymorphism is potentially misleading.