|
|
|
|
|
by stelonix
4835 days ago
|
|
Nonsense. To paraphrase myself from a similar discussion on reddit: "List.add(otherList) <-- what does this do? Why, compared to operators, would a function name be any better than an operator? Mathematics are part of computer science, and denying basic operators for a reason like "because someone might misuse them" is like denying functions because someone may implement a sum() and call it lcm() (and then we're back to goto land). You're confusing a programmer's error (bad choice of a name/operator function) with a language feature. Just because people can write bad code it does not mean we should disallow them to write great code." Honestly, it's about time the Java crowd stops with the mantra and starts thinking from themselves. Or at least, learn why the reason you hate operator overloading is fallacious. |
|
It is just symbolic names, like doing abstract mathematics with letters instead of numbers.
Except for C, Java and Go, all the remaining mainstream languages allow for symbolic names in the functions/methods.
I never understood what was the big deal.