What could become a strong JVM alternative language: Scala, Clojure, Fan, JavaFX Script, or others?

I have now decided to use an alternative JVM language to plug in my existing Swing desktop written in Java 6. Given that JavaFX is specifically designed for this type of application, it seems like my best bet: JavaFX Script .

However, what about other kinds of applications and libraries? Is JavaFX Script the best choice for the second JVM language?

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

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

+2


source to share


3 answers


My main question is, why are you porting an existing application? The answer to this question may give you some idea of ​​where you want to go.

Some quick perspectives for basic options:



  • Scala is better Java than Java in my opinion. If you want a language that takes the best bits of Java but adds many new innovations and features, then this might be for you.
  • Clojure is an amazingly well-designed language, especially if you believe in the future of highly complex concurrent applications. It's also very productive - I can create more value / hour in Clojure than any other language. However, if you don't already know Lisp, this will seem very unfamiliar. If you're willing to live on the cutting edge to get these benefits, Clojure may very well be for you.
  • JavaFX script - has some very nice features for GUI design and clearly supports Sun / Oracle. On the other hand, I don't see it has massive traction outside of this domain. I suggest giving it a trail run to make sure it suits you.
  • Java - should still be on your list! If the reason you are porting is because the code becomes difficult to maintain, then perhaps a focused re-factoring phase of staying in Java could bring you the benefits you want. You can write perfectly good graphical applications in Java.
  • Groovy is a really good JVM scripting language. Especially good if you want to embed scripting functionality into an existing Java / JVM application. Not sure if I would choose it to (re) write a complete application.
  • JRuby / Jython - haven't seen this much, but heard good things. Probably most suitable if you have Ruby / Python skills on the team, but also want to take advantage of the JVM platform.
+3


source


The best alternative language and the best language in general, IMO is what best allows you to write a program in the best model for you.

So, if you are writing a graphical application, then Scala may not be the right choice since you will not be moving away from Swing.

If JavaFX suits your needs the best, 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 is the best choice.

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

+2


source


All sound like a good choice. You can add JRuby to the list ...

+1


source







All Articles