Java 2 SDK 1.5 Language Changes
Having glanced at a few examples of the new 1.5 code, I'm not sure I welcome these changes. It's probably just a case of knee-jerk concerns about backward compatibility. I guess they were trying to make the language easier to use, but they've introduced complexities.
Autoboxing looks too much like the String concatenation mess. Everyday I curse other developers for having concatenated Strings instead of using the StringBuffer. This just looks like more of the same possibly inefficient behind-the-scenes work done by the language. Hiding the real object-oriented method calls just breaks the simple paradigm for me.
Generics also seem complex as well. I'd rather just implement my own collections that check and enforce a type, instead of having the language magically do it. This extends Java beyond the realm of simple, easy rules into complex C++ land. Variable arguments are the same way -- I could have just used an Object[]
array.
I know when I came to Java from C, I missed my Enums, but after a couple years, I can't remember for what I would have wanted them. printf
and importing static methods could be slick without causing me too many headaches.
I'm probably just clinging to the old familiar limitations like an old assembly language programmer.
Filed Under: Java