Pages

Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

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).

Monday, January 15, 2007

Fortress To Replace Fortran

Java, whether yo like it or not, is perhaps the most revolutionary programming language since C++. Java set a new standard for object oriented languages.

Sun Microsystems, who wrote Java, has a new language they are working on called Fortress. Here are the two main goals:
  1. Be the most powerful and efficient programming language for supercomputing.
  2. Use mathematical syntax, not traditional programming syntax, so that scientists are more at home with the language
Here is an example:


I'm sure some readers are skeptical, but I hope Sun pulls it off. Wouldn't it be wonderful if the the most powerful and efficient supercomputing language was written in a syntax easilly recognized and implemented by all scientists? Sun's motto for Fortress is "Do for Fortran what Java did for C." In the proper context, Java revolutionized C.(Like commercial software) Hopefully, in the supercomputing context, Fortress will do the same for Fortran. That would be great.

The only unfortunate thing is, they claim they have so many features they want to implement, it won't be ready until 2010. :( Since it is in such infancy, the above notation may evolve into something even easier to work with. Also, since it will be open sourced, expect lots of libraries and extensions from worldwide users which I think can be really helpful.