much welcomed
By whom ? If I recall correctly, there was a poll here about operator overloading, and almost 60% were against this feature. Of the remaining 40%, only a fraction wanted to allow it anywhere - the others wanted to restrict its use to some packages, like java.util.
I personally think the cons outweigh the pros by a large margin on this one. Haven't we learned anything from the C++ days ? It can hurt readability and maintainability very badly, for a marginal gain in a couple of situations.
And before you argue you are a responsible developer and you would only use it where it was profitable : I don't doubt that for a second. But you seldom work from scratch, right ? You use and modify other people's code all the time, don't you ? Operator overloading is more often than not misused - do not underestimate the propensity some people have to use all the bells and whistles a language provides.
needed
Where ? I'd wager it would have limited usefulness. It could make some maths slightly easier to read, true... and that's about it, I guess.
Adding complexity is only an acceptable tradeoff if you get something really useful in return. Some of the new features in Tiger fit the bill, for me at least. Enumerated types ? Sure. Generics ? Close call. Static imports ? Meh... at least it can't do much harm.
Operator overloading ? Definitely not worth the added complexity and future maintenance nightmare. Again, we should know better and learn from C++ mistakes.
--
As for me, I'll probably be using Java 6. |