views:

586

answers:

11

Dynamic languages are on the rise and there are plenty of them: e.g. Ruby, Groovy, Jython, Scala (static, but has the look and feel of a dynamic language) etc etc. My background is in Java SE and EE programming and I want to extend my knowledge into one of these dynamic languages to be better prepared for the future.

But which dynamic language should I focus on learning and why? Which of these will be the preferred language in the near future?

+14  A: 

Learning Ruby or Python (and Scala to a lesser extent) means you'll have very transferrable skills - you could use the Java version, the native version or the .NET version (IronRuby/IronPython). Groovy is nice but JVM-specific.

Being "better prepared for the future" is tricky unless you envisage specific scenarios. What kind of thing do you want to work on? Do you have a project which you could usefully implement in a dynamic language? Is it small enough to try on a couple of them, to get a feeling of how they differ?

Jon Skeet
+1  A: 

JScript is quite usefull, and its certainly a dynamic language...

Arjan Einbu
+4  A: 

In the game industry Lua, if you're an Adobe based designer Lua is also good, if you're an embedded programmer Lua is practically the only light-weight solution, but if you are looking into Web development and General tool scripting Python would be more practical

Robert Gould
Lua's main strength is embedding/extending it with C (and/or C++). I wouldn't recommend Lua to somebody who is mostly comfortable with Java and JVM.
Tadeusz A. Kadłubowski
Yeah thats a good point, but future proofing oneself is about diversity, so it might still be a good choice as it'll broaden his skills way more than a Java-base language
Robert Gould
+1  A: 

If you want a language with a good number of modules (for almost anything!), go for Perl. With its CPAN, you will always find what you want without reinventing the wheel.

Alan Haggai Alavi
+5  A: 

I would take a look at Scala. Why ?

  1. it's a JVM language, so you can leverage off your current Java skills
  2. it now has a lot of tooling/IDE support (e.g. Intellij will handle Scala projects)
  3. it has a functional aspect to it. Functional languages seem to be getting a lot of traction at the moment, and I think it's a paradigm worth learning for the future

My (entirely subjective) view is that Scala seems to be getting a lot of the attention that Groovy got a year or two ago. I'm not trying to be contentious here, or suggest that makes it a better language, but it seems to be the new JVM language de jour.

As an aside, a language that has some dynamic attributes is Microsoft's F#. I'm currently looking at this (and ignoring my own advice re. points 1 and 2 above!). It's a functional language with objects, built on .Net, and is picking up a lot of attention at the moment.

Brian Agnew
F# is interesting certainly, but it's not a *dynamic* language.
Jon Skeet
This is why I brought it up as an aside. Interestingly http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/faq.aspx#IsItDynamic is conflicted wrt. whether it's dynamic or not. I'm not experienced enough in F# to make that call one way or the other.
Brian Agnew
I've modified the aside to be more obviously 'aside', however
Brian Agnew
+10  A: 

Scala is not a dynamic language at all. Type inference doesn't mean that its untyped. However, Its a very nice language that has nice mixture of OOPs and functional programming. The only problem is some gotchas that you encounter along the way.

Since you are already an experienced Java programmer, it will fit nicely into your skillset. Now, if you want to go all the way dynamic both Ruby or Python are awesome languages. There is demand for both the languages.

Hemant Kumar
It has the REPL console though - which is "dynamic" from a certain perspective - and implicit conversions; so it "looks" dynamic
oxbow_lakes
Haskell has a REPL as well.
Rayne
+8  A: 

I would personally recommend Clojure. Clojure is an awesome new language that is going in popularity faster than anything I've ever seen. Clojure is a powerful, simple, and fast Lisp implemented on the JVM. It has access to all Java libraries of course, just like Scala. It has a book written about it already, it's matured to version 1.0, and it has three IDE plugins in development, with all three very usable.

Rayne
Its java access does not require any wrapping or messy conversions.
Arthur Ulfeldt
All of the above may be true, but realistically I think Clojure is a long way behind the likes of Ruby, Python and even Groovy in terms of adoption/popularity.
Don
@Don, it's been gaining popularity at an alarming rate. Don't look now, but you might be wrong.
Rayne
+3  A: 

I'd recommend Python. It has a huge community and has a mature implementation (along with several promising not-so-mature-just-yet ones). Perl is as far as I've seen loosing a lot of traction compared to the newer languages, presumably due to its "non-intuitiveness" (no, don't get me started on that).

When you've done a project or two in Python, go on to something else to get some broader perspective. If you've done a few non-trivial things in two different dynamic languages, you won't have any problems assimilating any other language.

JesperE
I think many Perlers are moving to Ruby as it's kind of a Perl++
Robert Gould
Yes, that is probably true.
JesperE
On the other hand learning another language that is like something you already know has less value than learning something completely different.
Makis
+4  A: 

I found Groovy to be a relatively easy jump from an extensive Java background -- it's sort of a more convenient version of Java. It integrates really nicely with existing Java code as well, if you need to do that sort of thing.

John Flinchbaugh
A: 

i would vote +1 for Groovy (and Grails). You can type with Java style or Groovy still (you can also mix both and have no worry about that). Also you can use Java libs.

nightingale2k1
A: 

Well keeping in mind your background, i would recommend a language where the semantics are similar to what you are aware of. Hence a language like Scala, Fan, Groovy would be a good starting point.Once you get a hang of the basic semantics of using a functional language(as well as start loving it), you can move onto a language like Ruby. The turn around time for you in this way gets reduced as well as the fact that you can move towards being a polyglot programmer.

Which of Scala, Fan or Groovy would you recommend and why?
Dipper
Well if you want to experience the power and simplicity of a dynamic language i would recommend groovy. Pretty simple to acquire if you are coming from a java background. Quiet a lot of good books and documentation is available which obviously is a big plus.