Christopher Smith wrote: > Paul G. Allen wrote: >> Christopher Smith wrote: >>> Java lacks from that list: >>> 1) overloaded operators >> OK, you got me there. I missed "operators" and threw in methods. :) >> (but as Stewart pointed out, this is a good thing) > > I wasn't debating whether it was a good thing. In general these are > trade offs. My point was that this feature, along with the others I > mentioned, allows for a unique capability that is nice to have. > >>> 2) access to platform specific features (yes, you can use JNI but at >>> that point you aren't using Java) >> Well, aside from JNI, there's the example of the COMM API and SerialIO >> API. There's also Java extensions allowing access to platform specific >> features. > > Umm.... no. these are API's provided by Java, through JNI. > >>> 3) destructors, and lexically scoped resource management in general >> Yes, Java does. Look up finalize() for a destructor of an object. > > Finalizers are not destructors, and arguably actually have more problems > than destructors. > >> There are also ways to manage garbage collection outside of the automagical >> way Java normally handles it. Also look at java.lang.management (Java >> 1.5) for another way to handle resource management. > > Sigh. Everyone seems to think that the only resource one might want to > manage is memory. Basically java.lang.management gives you a few small > knobs for memory management and a few ways to monitor use of a couple of > other specific resources. In the area of resource management Java is a > fork with one tine (actually, I'll give it provides nearly as good 90% > case support for synchronization resources). > >>> 4) multiple inheritence >> Java does provide for it. It is awkward to implement, but can be done >> through the use of interfaces and mixin classes. It is also very rarely >> needed. > > It's rarely *used*, not rarely *needed*. The hacks for doing mixins in > Java (even with generics) don't allow you to do policy based design. > Thank you, type erasure.
<..snip..> I came across a wiki (http://www.cakoose.com/wiki/) that seems to have some readable ramblings, including one called "Type erasure is not evil" Of course there are many hits on "type erasure", and another one nearby on the google list is "What's Wrong With Java: Type Erasure" http://www.safalra.com/programming/java/wrongerasure/ It seems, though, that both articles criticize Java more so than type erasure, per se. ..jim -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
