C++ sucks

Peter Korsten EMAIL HIDDEN
Fri Nov 23 01:58:36 CET 2007


Martin Naef schreef:

> Peter Korsten wrote:

> I'm well aware that I do very specialised things here, which are not 
> relevant to a large proportion of other software developers. But that's 
> exactly why I like C++: It give me all the power I want - I'm *in 
> control*, but the price I pay is that I'm also 100% responsible.

Yes, we do very different things. Some months ago, we got a new project 
from the commercial department. Customer is low on credit for her mobile 
phone, she sends a message to a short number and we give her Lm 0.50 
(about ?1.15). The next time she tops up, the amount is deducted again.

Now, from a developer's point of view, this is an exceedingly boring 
project. So I decided to make it a bit more challenging. I made an API 
that is very similar to Java's servlet API, but the 'recharglets' 
(recharging being the jargon phrase of giving credit to the customer) 
are aimed at handling very specific actions. In this API, there's only 
interfaces and one abstract class with a couple of concrete methods.

The container for the recharglets takes care of dynamically loading 
them. The container itself resides inside a web application so it can 
receive web service requests. Another API for the client, a third API to 
talk to the prepaid system, and that's about it.

To do this in a language other than Java (or C#, which is basically the 
same but, as always with Microsoft products, more aimed at currents 
trends and demands) would be a horrible amount of work. But Java and its 
tools make it very easy.

After this discussion, I looked a bit on the internet (OK, Wikipedia) 
about the disadvantages of Java. And there are quite a few, like 
inconsistent use of the garbage collector (it's not being used to close 
files or database connections), and a couple that weren't mentioned (the 
use of proxy classes, way too cumbersome in my opinion).

So maybe I should get involved in the Java Community Process... but some 
of the things they've done for 1.6 (escape analysis) and that are 
planned for 1.7 are interesting, if you're into that sort of thing.

Which a majority of this list isn't. :)

- Peter



More information about the music-bar mailing list