2 ms·
There is no argument from me that a + b is more readable than a.add(b). Java founding fathers (Gosling?) decided against operator overloading sighting the mess
by sorokod 8y ago
There is no argument from me that a + b is more readable than a.add(b). Java founding fathers (Gosling?) decided
against operator overloading sighting the mess it allowed to created in other languages. The mathematical notations
for spelling out polynomials has been optimized over some time - Java being a general purpose programming language
has other fish to fry.
There are languages that allow for a cleaner way to express mathematical statements, this is valid Julia:
julia> p(x) = (5x^3 - 3x^2 + 7x + 1)/(3x^2 - 7x)
p (generic function with 1 method)
julia> p(1 + 2im)
2.4 + 0.2im