Do I really need to learn Java?

Nathan Gray n8gray at caltech.edu.is.my.e-mail.address
Tue May 15 06:31:44 CEST 2001


>Can somebody explain what the advantages/disadvantages of using Java (or
>C++) compared to python? And whether I will have to use Java in certain
>situations?
>

There's one serious flaw in Java that stops me from turning to it for almost
*any* programming project.  Memory usage.  Here's a pretty neat computer
language comparison:
http://www.bagley.org/~doug/shootout/

Notice that the Java code consistently takes 5-40 times (!!) more memory
than *any* of the other languages in almost every single test!  If it were
one or two tests, I would chalk it up to a flawed program, but this is a
consistent, serious problem.  My personal experience with writing Java code
supports these benchmarks.  I took a course in Java at work and wrote a lot
of simple programs.  It seemed that no matter how small the program, it
grabbed at least 10 to 20 megs when it ran.

Then there's JEdit, a really nifty text editor written in Java.  I was
looking for a good cross-platform editor and this seemed like the ideal
solution.  It was unusable, though.  Ground my 64 Meg machine to a halt!
While 64 megs isn't much these days, it should certainly be enough for
editing a handful of text files!

Now Python isn't going to win any contests for slimmest runtime, as the
benchmarks show, but at least it's not a flat-out glutton!

Avoid Java unless your job depends on it.

-Nathan






More information about the Python-list mailing list