3 ms·
But that's the point: convention is a product of the community. You don't need operator overloading to design classes with shorter method names.
by abalone 11y ago
But that's the point: convention is a product of the community. You don't need operator overloading to design classes with shorter method names.
- deleted 11y ago[deleted]
- hdctambien 11y agooperator overloading means changing what + or * do. Ie, overloading the * operator for a Matrix class so you could do this: Matrix a = new Matrix(); Matrix b = new Matrix(); Matrix c = a * b; That is different than function overloading, which you are referencing.
- dikaiosune 11y agoIn many cases, the community starts with something that looks like a languages standard library. And Java's is very verbose, so it makes sense that the community would have verbose method names as well. However, while I can see it taking some getting used to if one comes from a different background, I personally find Java to be nicely self-documenting when using the conventions on display in the standard libraries. Lines are long and sometimes a statement spans multiple, but in many Java libs/apps things do exactly what they're named.