Posted May 13, 2005 5:46 UTC (Fri) by ncm
In reply to: A need?
Parent article: A new Harmony Project
So, Jon, are you saying your software is an order of magnitude harder to make work than everybody else's? The Boost library provides all manner of encapsulation of the differences between various targets (file system, socket semantics, buggy-as-hell compilers), along with encapsulating facilities impossible to express in Java. I doubt you've looked at C++ since the mid 90s; things are much, much better now.
For example, it's been, literally, years since I last coded a "delete" statement, or any semantic equivalent. Java's garbage collection would be not only useless to a modern C++ coder, but an active nuisance interfering with reliable encapsulation of resource management. (Not even world experts -- e.g. Hans Boehm, Herb Sutter -- can elucidate how finalizers might be written so as to be reliably safe to run.)
To claim an order of magnitude difference of effort between coding Java and C++ (for those tasks Java can address at all) is ludicrous on its face. It's common to claim that coding small programs in Python, and where performance doesn't matter, is three to five times quicker than in C++. That's not implausible. However, (1) Java is no Python, and (2) it's in the nature of easy problems to be easy. For hard problems you need a powerful, expressive language to encapsulate abstractions, and Java entirely fails in that. For what is Java the right language? For easy problems Python (or practically anything nimble) is right. For hard problems, C++, or ML, or even Common Lisp is right. Is there supposed to be a hair-thin sliver in the middle where Java fits, too weak and slow for big problems, too clumsy for small ones?
Take a look at Monotone for a substantial but not-incomprehensibly-large example of a cross-platform C++ program. See how much effort has really gone into porting it among Linux, Unixes, Win32, and Macosix.
No, C++ is no replacement for Java. C++ was here first. It graduated from mere "object-orientation" -- where Java remains mired -- in the mid-'90s. Rather: Java would be an entirely inadequate replacement for C++. The world does need a simpler but at least equally powerful replacement for C++, and will get one someday (certainly C++0x will come out first) but Java was never even in the running. (Java might, finally -- if it doesn't fade away when Sun gives up and drops it -- supplant COBOL; the user populations and application domains are similar.)
to post comments)