views:

587

answers:

2

I am currently deciding on an alternative JVM language to port an existing Swing desktop application written in Java 6. Given that JavaFX specifically targets this kind of application, it would seem that my best option is JavaFX Script.

However, what about other kinds of applications and libraries? Would JavaFX Script be the best choice in general for a second JVM language?

Currently, it seems that Scala is the most talked about alternative to the Java language. This month (October 2009), it is at position 34 in the TIOBE index, while JavaFX Script is at position 44, and Clojure, Fan, and Groovy are at positions below 50.

So, what are your impressions? Which language would you invest your time in learning and using (and why), assuming you can freely choose the language for a given project to run in the JVM?

+1  A: 

Those all sound like good choices. You could add JRuby to the list...

DigitalRoss
Some time ago, Sun appeared to be interested in pushing JRuby. Now, it seems that the focus (and the money) has moved to JavaFX. It would be interesting to know if this really is the case.
Rogerio
Well, the JRuby developer has moved from Sun to Engine Yard. Ruby is obviously doing well and I expect both JRuby and Ruby are here to stay. JRuby does run Rails, you know, and that's the acid test for Ruby functionality. (The *Rails Singularity*.) There are other Ruby projects out there that still can't do that
DigitalRoss
I do agree that Sun, err, Oracle, is clearly investing in JavaFX. But I also suppose we don't care if Intel supports a given thing that happens to run on their CPU line. Perhaps Sun support for a given JVM compiler isn't such a big deal? I understand your concerns but after citing the Tiobe index you then reject a language in the top 10 in favor of some that got slaughtered, and I say that as a fan of Scala and Clojure. :-)
DigitalRoss
I am only interested in JVM languages for now, so Ruby (which is a great and successful technology, no doubt) isn't under consideration. I am also aware of JRuby's progress. But still, I would bet on either Scala or JavaFX Script for the future, given the current situation.
Rogerio
A: 

The best alternate language, and the best language overall, IMO, is that which best allows you to write the program in the best model for you.

So, if you are writing a GUI app, then Scala may be the incorrect choice, as you wouldn't be moving away from Swing.

If JavaFX best meets your needs, then use that language.

If you know LISP then Clojure would be a good choice, but, like Scala, not for this problem, it sounds like.

If you don't know lisp and you want/need a functional programming language, then Scala would be the best choice.

Basically, there is no one language that is best in all situations, it helps to know what you want to do, and the strengths/weaknesses of the various options.

James Black
I agree with everything you said, but I don't really look forward to learning/using half a dozen different languages for the JVM. Also, most of these languages are probably never going to become mainstream...
Rogerio
Just be aware of them. For example, if you don't know lisp, then ignore Clojure. If you don't ever need FP then skip Scala. If Java SE/ME/EE does everything you need, but you are missing one or two features, then just find the language that will help with that and learn that one.
James Black