Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: looking at generic



Oh, to make a useless post to this thread as well :D

I wished there was a C++ -> Java Byte Code compiler with minimal extensions:

a) operator [] overloaded by standard (as long as the user does not provide its own overloading)
b) adapted destructor synthesizing


Basically: C++ with all the nice features Java gives: Reflection -> Introspection -> Serialization -> RMI, and a superb standard library, that would be my language.

I use Java because I value currently the idea of byte code and the chain of implications above more than templates and expressiveness.

However anyone arguing against C++ in my eyes only did not make enough positive experience with it :D (yeah, when C++ was all ready main stream it was *not* mature, at least not the compilers and tools available).

IMHO SUNs decision to go for generics and not for templates was the easy way in terms of upgrading the libraries ... however I long feared that they might be the death to the language. Meanwhile I think the user base is to strong and people will tend to rather avoid using them instead of dropping java altogether.

Two big things make Java as a research and development language less interesting: no multiple inheritance (see Eiffel, C++ etc.) and no templates see (Eiffel, C++).

The current feeling that ClassCastExceptions won't be such a trouble any longer is simply wrong. I use generics since about 2 years ... with generics you have *FAR* more ClassCastExceptions than before.

Because of the type erasures your code (IDE/compiler/RMI application loading code via the network) is very often in the situation that a List<String> is somehow becoming a List and finally a List<Integer> and when you send this back as serialized object via the network your perfect generized code breaks with ClassCastExceptions.

That happened at least 100 times in my work over the last two years. If Java 5.0 had not annotations and enums I would bet my few Apple shares (and my few SUN shares as well) that the mainstream developers (inhouse in companies making their own software for own use) would stick to Java 1.4 as long as bearable.

Regards,
   Angelo

P.S. I want templates, and template meta programming and probably frames as well not generics :-/

--------------------------- www.oomentor.de --------------------------
Angelo Schneider         OOAD/UML         email@hidden
Putlitzstr. 24       Patterns/FrameWorks          Fon: +49 721 9812465
76137 Karlsruhe           C++/JAVA                Fax: +49 721 9812467

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: looking at generic (From: Rolf Howarth <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.