Pages

Tuesday, November 11, 2008

Is Java Underated?

You may remember my posts praising Python and wondering why I keep hearing, what I think with modern compilers is a myth, that Fortran is faster than C++. Here we go again. :)

Time has convinced me your *best* numerical programmers will use a hybrid of fast compiled languages mixed with scripting languages. I still think Python will win as the best numerical scripting language. But what is still unclear to me is which will be the best compiled language.

Recently I have been thinking Java may end up winning in the end. I give you my top 5 reasons:
  1. Java appears faster that Fortran, and only slightly slower than C++. Read it and weep Fortran programmers, according to The Computer Language Benchmarks Game, on virtually every platform and Linux distribution Java outpreforms Fortran. As I said in the past, modern compilers seem to be putting langauges like Java and C++ ahead of Fortan. (If someone has other benchmarks using Modern compilers, I would be interested)
  2. Java is getting commercial support in this area. Sun puts tons of money into Java and it is improving rapidly. Furthermore, IBM was given a lot of money by the government to create a next generation high performance computing language. What did they decide to do? Create a superset of Java and call it X10.
  3. Java was designed for Internet/Multi-Threaded computing. Java was built from the ground up with the idea of computers working together over networks in mind. In an age of increasing processors, nodes and threads, a language made for this is really handy. I bet this was a major reason why IBM decided to use Java as their research project. (See above).
  4. Everyone is learning Java and could thus contribute. Essentially every computer science student, and non-CS student taking CS classes, is trained on Java. If the numerical community switched to Java essentially everybody in the world who knows how to program can jump on board and contribute. (Unlike Fortran which is only used by a smaller and smaller subset of scientists.)
  5. It has all the necessary perks: Open source (~99% at least) and free to use so "Joe the Physicist" can freely use it to write numerical program for his collaborative project. Better than C++ and Fortran from a CS standpoint. Easier and more strait forward to use than C++ and Fortran. It is more safe and secure, ...
As always a prediction: It will take a generation. 40 year old physicists who have programmed in Fortran for 20 years and have written all their code in Fortran are not changing. Not until large numbers of physicists learn Java (this is happening in CS classes) and take time to write/rewrite the existing codes out there, Fortran and C++ aren't going anywhere. It will take a generation.

So, check back in ~20-25 years, and we will know. :) Though my vision is cloudy, I think Java has a real chance to be the dominant numerical language. (With Pythonor should I say Jython).

No comments:

Post a Comment

To add a link to text:
<a href="URL">Text</a>