Tuesday, February 13, 2007

Java vs C++

Despite what some people say about C++, I still like it better than Java.

Using Java is like being at day care. You are well taken care of, everything is soft and nicely rounded. Things seem a bit bigger and blockier than they need to be - but hey, it's for those kids who have poor manual dexterity. We want them to feel good too.

Using C++ however, feels like being in a pro-machine shop. Things are big and bulky when they need to be (or due to lazyness), or they can be as lean and mean as you'd like. It's slightly dangerous there, so it's definitely for those who know what they are doing, but small price for getting exactly what you want.

One that that kind of irks me is most of the Java code I see never seems to be DOING anything. All it does is calculate a field and call some other class. Nothing ever seems to get DONE. It's all so abstract - you literally have to chase dozens of stack frames to get to anything so primitive as printing or the like.

While Java sucks the memory like no one else's business, so can Python. Yet I feel more efficient in that language - maybe it's the lexical efficiency I'm mistaking for run-time efficiency. Or perhaps I'm tired of watching 1 GB RSS java binaries suck up 100% cpu while doing apparently nothing.


Anonymous said...

Amen, brother! Java's basically "C++ for dummies", but costing twice the CPU and five times the RAM (see Debian's shootout). And people pay that for an absence of multiple inheritance and mandatory garbage collection...

Anonymous said...
This comment has been removed by a blog administrator.