A Funny Java Flavoured Look at the World

Thursday, November 30, 2006

Is Java getting bloated?

A friend of mine sent me an email today pointing me towards Stroustrup's web page, for those of you who don't know he is the person who invented C++. Here is his homepage http://www.research.att.com/~bs/ and it's quite interesting (even for a Java person)

of course because he invented C++ he is bombarded with questions comparing Java with C++ and which one is better/faster/more Object Orientated etc. So he put questions such as this into a FAQ list and this one in particular caught my eye

Is Java the language you would have designed if you didn't have to be compatible with C?

No. Java isn't even close. If people insist on comparing C++ and Java - as they seem to do - I suggest they read The Design and Evolution of C++ (D&E) to see why C++ is the way it is, and consider both languages in the light of the design criteria I set for C++. Those criteria will obviously differ from the criteria of Sun's Java team. Despite the syntactic similarities, C++ and Java are very different languages. In many ways, Java seems closer to Smalltalk than to C++.

Much of the relative simplicity of Java is - like for most new languages - partly an illusion and partly a function of its incompleteness. As time passes, Java will grow significantly in size and complexity. It will double or triple in size and grow implementation-dependent extensions or libraries. That is the way every commercially successful language has developed. Just look at any language you consider successful on a large scale. I know of no exceptions, and there are good reasons for this phenomenon. [I wrote this before 2000; now see a preview of Java 1.5.]

Java isn't platform independent; it is a platform. Like Windows, it is a proprietary commercial platform. That is, you can write programs for Windows/Intel or Java/JVM, and in each case you are writing code for a platform owned by a single corporation and tweaked for the commercial benefit of that corporation. It has been pointed out that you can write programs in any language for the JVM and associated operating systems facilities. However, the JVM, etc., are heavily biased in favor of Java. It is nowhere near being a general reasonably language-neutral VM/OS.

Personally, I'll stick to reasonably portable C++ for most of the kind of work I think most about and use a variety of languages for the rest.


This seem quite an amusing question to ask someone who invented C++ I wonder if people still compare Java and the various C languages so much any more, it seems to me and I admit I don't know that much about C++ etc that Java's speed and the processors in computers have improved enough so that speed is not the main issue any more. I have a sneaky feeling that this is probably because the stuff I have been working on is not on such a big scale that time is that important to me and I'm sure C++ is probably still quicker but it doesn't really matter to me.

It's interesting about his point that the JVM will bloat up, this does strike me as a fairly obvious statement because the more stuff that is added to the JVM and the Java language the bigger it is going to get. I remember listing to a debate/discussion on the Java Posse where they were talking about the database being added to the JVM, they were saying it would be nice if people could choose.

I was wondering if with Java going open source that there will be skinny versions of the JVM and people stripping out stuff they don't need a bit like Linux and it's kernel. Then again does it matter that much, computers have plenty of hard disk space.

I like his comment that JVM is a platform and not platform independent, I hadn't really thought of the JVM as a platform before.

As he wrote the FAQ quite a while ago he did quite a good job of predicting the future but I wonder how Java going open source will effect things like speed and bloatness. Does anyone have any comments on this, I would like to hear what you have to say as I am a bit in the dark over such things. Is Java getting/is bloated and does it matter?




If you like this blog or and fancy something a bit less technical with some laughing thrown in then check out my other blog Amusing IT Stories. Which is a blog about funny and amusing stories from the IT environment and the office. It is a mix of news, office humour, IT stories, links, cartoons and anything that I find funny

4 Comments:

  • Hmm, I don't consider the Java language bloated. Since that FAQ entry was written, only a handful of changes were made to the language. C++ and C# are very much more complex and, perhaps, more bloated than Java.

    By Anonymous Anonymous, at Fri Dec 01, 04:32:00 pm 2006  

  • The nice thing about java is that you are able to run your compiled programs on windows, mac , linux , different unix, os390 ....

    Therfore it can not be compared to writing for windows. And it does not matter if it should grow in size. (These days size is no drawback only promising a richer usage) If only it does not fragment into norunable on listed plattforms. That would be bloated.

    By Anonymous Anonymous, at Wed Dec 06, 11:51:00 am 2006  

  • I know Java from using my web browser, and I really hate that Sun Java is way bloated and slow. Sun may have won the lawsuit with Microsoft, but the every day users of the browsers have suffered with their insanely slow and bloated product.

    By Blogger tekgems, at Mon Apr 14, 04:06:00 am 2008  

  • I guess most people don't realize that Java, as a language, is a "smaller" language than C++... It only supports object oriented programming; nothing else... as a matter of fact, from what I know, the gcj people treat it kind of like a subset of C++. On the other hand the standard library that comes with Java is _huge_; if Java suffers of bloat, it in its standard library.

    In terms of whether you care about C++ for development depends on what you do. We do optimization software and some of our clients run our optimizers on 10,000 variables. When dealing with problems that size, Java just does not cut it anymore... The cost of running for 2 days is significantly higher than running for only 12 hours. Business applications reading and writing to databases? Use Java, it's easier to get the job done.

    By Anonymous Anonymous, at Thu May 29, 06:09:00 am 2008  

Post a Comment

<< Home