views:

308

answers:

12

As a programmer new to the software engineering industry, I'm trying to decide a new language to learn. I currently use Ruby/Javascript/HTML/CSS/SQL at the workplace, but would like to try a compiled language for a change. I am currently torn between learning a functional language like Haskell, or an imperative language like Java.

All else equal I would probably opt to learn Haskell, but the reality for a junior programmer like myself is that the number of job openings for Java is far greater. I also have little chance to use either language at my current workplace (a small chance for Java, and likely 0% for Haskell). That said, what would those of you that have been in the field recommend?

This is not to say I would be dissatisfied learning Java- Haskell just seems to be more of a "mindbender" :) .

Thanks in advance.

A: 

If you want to learn a language just for sake of it then choose what ever you like.

But as you mentioned about job as well then choose the job which will give you the job. If job market is of Java then learn that first, in your free time you can anytime learn Haskell.

Bhushan
+7  A: 

Learn Java and Haskell.

Java shouldn't take you long. Once you get comfortable with a static language, all the other concepts are things you've already seen in Ruby.

Haskell takes longer, and is something that I think you should work on slowly.

Ultimately though, it depends on why you're learning: to satisfy your curiosity about something or to increase job prospects? Which one is more important?

If the former, do whatever interets you more. If the latter, learn Java.

Note, however, that while Java the language won't take you long to get comfortable with, Java the ecosystem will take you far longer. And the ecosystem is what most employers are really looking for.

thedz
+1 for mentioning the ecosystem
flybywire
@thedz : I am also planning to learn JAVA. Can you give some idea about JAVA ecosystem or nice tutorial/place where I can learn all about this ?
seg.server.fault
When people say ecosystem they mean things like libraries, apis , standards, tools, and common practices that go along with a language.
Peter Recore
@seq.server.fault Nobody uppercases Java.
Rayne
+2  A: 

Java and Haskell are two very different beasts.

Do you want to learn Object Oriented Programming, or Functional Programming? They're both very different methodologies.

Aaron
+3  A: 

Learn both, but learn Haskell first. Every new language you learn will broaden your perspective and improve your skills in other languages.

I think this is particularly true with Haskell, since it has a lot of concepts which aren't usually seen in other languages. Most of these concepts (such as writing side-effect free code) can be applied elsewhere. A good tutorial is A Gentle Introduction to Haskell. If you want some beginner exercises, check the homeworks for Caltech's Haskell class.

That said, you are much more likely to be able to find jobs that require Java. If you've worked much with object oriented stuff in Ruby, then it will be pretty easy to pick up.

Jay Conrod
+1  A: 

I'd learn C / C++ before either of those. You'll learn the lower level memory management, which is a good foundation to have, and it will be more marketable than Haskell. Since you're pulled both towards marketability and stretching yourself, this seems like a route that advances both goals at the same time.

Anon
+1  A: 

You'll need to learn both. I learned Haskell first, then Java, now I use Haskell at work, after teaching Java for a few years. They represent differents ends of the language spectrum, and you'll be a better developer by far if you're comfortable with both.

Don Stewart
A: 

If you need a job then learn what you need to get that job. Right now the easiest is with .NET and Java. I went with Java as I do not want to solely work with Windows. The "easiest" way to demonstrate that you can learn and learn fast, is to take a Sun Java Programmer Certification. http://www.sun.com/training/certification/java/scjp.xml

Then learn as many languages as you can, and learn them reasonably well. It will make you a better programmer. I like Haskell - the functional methology is really nice. Other suggestions are Prolog, Scheme, and Python.

Thorbjørn Ravn Andersen
A: 

I would learn Scala which is more powerful and fun than Java. It is a static type of language which combines both OOP and functional programming.

Enjoy Scala.

Shimi Bandiel
A: 

If you dont understand at least 1 language from top to bottom, dont even bother with Haskell. It will just cause you grieve. Leave that for a rainy day :)

leppie
A: 

If you're going to learn Java - I would encourage you to also learn C#. Maybe learning both at the same time will cause you some headaches (in my experience, most people learn Java, then C#, just due to the time at which each was developed). The two languages are similar, but different enough (and really, the .Net support with C# is enough of a reason to learn it in it's own right) that having both under your belt will put you in good standing.

TomFromThePool
+2  A: 

I suggest learning Clojure. Clojure is a dynamic (non-pure) functional programming language for the JVM. It's also a Lisp. Because Clojure is on the JVM, it has seamless interop with Java. You can use any code written in Java, straight from Clojure. Clojure code can also be called from Java. Clojure is a rather new language, and it already has a large, enthusiastic community. 3 IDE plugins are currently in development, and several of those are already usable. Stuart Halloway has also written a book, called Programming Clojure and it's really worth the money. Scala is another option, but I <3 Clojure.

Rayne
+1  A: 

Learn C. It will really solidify your understanding of how the machine works, especially what things cost. And knowing C won't hurt your job prospects, either. I just heard today from an engineering manager in a big bank who always hires people with C backgrounds because "they just understand things better."

Norman Ramsey