Reinier Zwitserloot wrote: > Exactly. If java had pure operators (where the operator's meaning is > independent of the expressions on either side), then adding operator > overloading is a mess, but java's operator set is a hopeless mess. > Utterly hopeless. It makes no sense at all, and therefore the argument > that operator overloading is going to make things confusing makes no > sense either; the concept of operator overloading (especially if you > add sensible caveats, such as requiring strict type limits (both sides > should be the same type, and the operation must also return that type) > would be *far easier* to grok than the current meanings of operator > overloading. > Having the language introduce a smattering of key operator overloading makes perfect sense to me (e.g. possibly for built in Number classes in addition to Strings /if/ the actual operations in BigDecimal were sufficiently clear and useful without additional arguments for scale, etc).
Allowing programmers to add their own operators still makes 0 sense to me for large, real world projects. If you have a 1 man project, operator overloading (even ala C++) is great. If you have a 200 man project, operator overloading in any form I can see is something not to be touched. Java is clearly biased towards the needs of larger organization and away from the needs of single-person or small team hacks. I do not see a reason to louse this up. There are other languages for small team hacks, e.g. Ruby. -- Jess Holle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
