|
Re: Should We Strive to Only Have One Language in Our Development Efforts?
|
Posted: Aug 3, 2007 9:11 AM
|
|
> > But C++ does not have garbage collection, so my
> What I meant was availability of garbage collection for > C++, so my statement should have been "C++ had garbage > collection available ..." (italicized word added). > But that's nitpicking. Indeed, speaking of C++ strictly as > a as a language, it does not have GC.
I would look at it differently, since I manage C++ projects that have to run on different compilers, with different RTLs and on different OS/hardware platforms: C++ does not yet have generally available garbage collection implementations for the platform combinations that we support. That probably will be true for another 4-5 years at least, although as soon as GC is standardized, I will be able to say that "C++ has garbage collection".
BTW - I am not actually a proponent of adding GC to C++, any more than I am a proponent of adding high level control flow to x86 ASM, or adding generics to Java. It's all lipstick on a pig, and I'm not into kissing any pigs. ;-)
> But neither does > Java language. It is the Java platform, JVM, > that comes with GC.
The Java language does explicitly specify garbage collection as being the means of memory management. The Java language includes the "new" keyword, and that is not a feature of a runtime library (e.g. alloc() in the CRT). Additionally, the Java language includes a certain set of runtime libraries, i.e. they are specified within the language spec itself; however, the memory management is not a function of the RTL in Java.
> Specificaly, in my opinion, Java finalization is inferior > solution than C++ - like RAII.
To be honest and IMHO, Java finalization is almost never used, and is itself probably a design flaw. A registration of a "future" callback would have been much cleaner, and is more in line with how the "reference" package does it (java.lang.ref).
> I am sorry for the "mirror" comment. It was sarcastic and > out of line.
No problem .. I'm a sarcastic SOB myself, and enjoy the humor. I don't like to think of myself as a bigot (who does?), but my opinions are probably as strongly held as anyone's ;-)
Peace,
Cameron Purdy | Oracle http://www.oracle.com/technology/products/coherence/index.html
|
|