Linked by Thom Holwerda on Tue 12th Oct 2010 21:52 UTC
Java "Oracle and IBM today announced that the companies will collaborate to allow developers and customers to build and innovate based on existing Java investments and the OpenJDK reference implementation. Specifically, the companies will collaborate in the OpenJDK community to develop the leading open source Java environment."
Permalink for comment 445026
To read all comments associated with this story, please click here.
gilboa
Member since:
2005-07-06

The question is why would you bother to use C to emulate C++ (unless you have to for some reason, e.g. for backward compatibility or to work around compiler limitations)?


Of the top of my head:
1. You only need a small subset of CPP OO capabilities (objects), but rather not get hit by the CPP compiler limitations. (E.g. strong types)
2. Memory allocation under CPP is abysmal, at best. (Even if you take the time to replace the new implementation with your own, you still cannot replace informative error codes...)
3. Class constructor (and destructor) are poorly designed (lack of informative error codes), forcing you to use C-like initialization functions.
4. I work in environments (such as kernels) that do no look kindly at linking against the CPP rt libraries, let alone using exceptions (!!!!!) as error handling mechanism...

In short, if you only require objects and limited inheritance, good C implementation is far superior compared to full fledged implementation CPP. (And don't get me started about STL!)

In the world where web apps are barely secure even though they are written in high level languages like Java, the last thing we need it to return to buffer overflows, dangling pointers, etc.


I fully agree. As I said, I didn't really agree with the OP.

- Gilboa

Reply Parent Score: 2