

Ask HN: What should be my next programming language? - nithinbekal

I am trying to decide what programming language to learn next. Couldn't think of a better place than HN to ask for recommendations and start discussions about programming languages.<p>I've worked on ruby/rails for over a year, so that's the language I'm most comfortable with, but these days I work on C and PL/SQL. I'm trying to pick up a language that's very different from the ones I've worked with. Here are the languages I'm considering:<p>Erlang/Haskell/Common Lisp: Understanding functional programming would be a challenge, coming from ruby's object oriented world and these languages seem the top contenders in that category.<p>Scala: It's has both object-oriented and functional features, so will it be easier to catch up with functional programming in Scala than with a purely functional language like Haskell?<p>Smalltalk: It would be fun to learn a language that's been around for over three decades and has had so much influence on the design of other languages.<p>Any other language? Clojure? Go? Brainf<i></i>k? ;-) Tell me what language you think would be most interesting to learn and why you recommend it?
======
sophacles
I vote for haskell. There are a couple of great online resources for free[1],
and if you are at all like me, you'll benefit immensely from it, even though
you never use it directly. Basically it is so weird that you have to learn new
ways to think. The cool thing is those weird things end up being applicable in
boring ruby/python/c type situations. Also, you start wishing everything had a
badass type system, because you start seeing problems that could easily be
solved by codifying them to ADTs and letting the type system sort out the
rest.

1\. Learn you a haskell for Great Good -- <http://learnyouahaskell.com/>

Real World Haskell -- <http://www.realworldhaskell.org/>

~~~
nithinbekal
I've taken a look at those resources. In fact, I even read a bit of Learn You
a Haskell and tried writing some code.

And yes, I am not looking for a language that I will use on a daily basis. If
I wanted to build something now, I will pick ruby because that's the language
I know best. Instead, I'd rather learn a language that makes me write code
differently.

Thanks for the advice. :)

------
Skywing
If I decide to pick up a new language, it'll probably be Scala. My only real
reasoning for that is because the language is younger, which just seems more
exciting. Now, if I could just find time or a reason to start using Scala then
that would be awesome. :)

~~~
nithinbekal
Yeah, Scala looks exciting, and from what little I've seen of its syntax, it
looks different enough to be interesting. Plus there's an excellent online
book that I could use to get started with it.

~~~
runT1ME
Scala also hits the sweet spot of both new but usable in production. Linkedin,
Foursquare, and Twitter all have significant portions of their apps written in
Scala.

I'd be a little more hesitant about creating a production app with Haskell,
though it's been done.

------
mcav
I'd recommend Clojure for two reasons: You'll get experience with functional
programming, and you'll be introduced to the JVM at the same time. If you
learn Clojure and later want to learn another JVM language, you'll be halfway
there.

~~~
nithinbekal
My past attempts at understanding Clojure have failed badly. (I must say I
didn't try that hard, though.) Would a foundation in Lisp make it easier to
learn Clojure?

~~~
mcav
Nah. Find a good book though, like _The Joy of Clojure_ or _Programming
Clojure_ to get you through the fundamental bits.

------
skeltoac
I picked up Erlang a couple of years ago because I needed to hack on a Jabber
server. Never mind the functional aspect; Erlang stands out for concurrency,
distribution, and fault tolerance. Several of my Erlang projects have been
running, at scale, trouble-free for months. I get a kick out of never getting
service alerts.

Lisp is another good answer to your question. It's different. And the cliché
is true: even if you never use it, your coding will improve if you understand
Lisp. (Land of Lisp is a fine primer.)

However, with Erlang it has been much easier to find actual projects to do.

~~~
nithinbekal
Thanks for the recommendations. A lot of people are suggesting different
functional programming languages here -- Erlang, Clojure, Haskell, Scala and
Lisp. I'm becoming more and more interested in learning Lisp before trying the
other languages. What do you think of such an approach? Would it help me
understand Erlang/Haskell/Clojure/Scala better in the future?

~~~
skeltoac
I am just now getting into Lisp so I can't say how learning it would affect
subsequent language exploration. Functional programming is good but if it's
the most interesting part of any language, that would be a boring language.
Erlang's functional style and pattern matching syntax were novel but the
immutable bindings, process spawning, and message passing made it interesting
to me. In Lisp, I am interested in S-expressions and macros (and wishing it
had those other Erlangly bits I mentioned!).

------
stonemetal
Factor, it is a stack based language that is fairly different from the rest of
the stack based languages(it counts lisp as one of its major influences. ) It
has a good standard library that includes both a web framework and a GUI
framework.

------
jmenu
Other than the language being different, what are your goals in learning a new
language?

~~~
nithinbekal
The main reason I'm looking for a new language to learn is so that I could
understand programming concepts better. I took up electronics in college and
then moved to software development, so my foundation in programming isn't very
good. That's what I'm trying to change.

~~~
jmenu
I also had three years of electical/electronics in college before I started
programming. I have been a java developer for eleven years and just recently
started programming in groovy. Both of these are native to the jvm and have
extensive apis for client and web programming. The grails framework which
harnesses the power of groovy, spring framework, and hibernate is like rails
in concept but it is its own. If I didn't know these languages, this would be
my next move.

~~~
nithinbekal
Please correct me if I am wrong here, but isn't Groovy/Grails too similar to
Ruby/Rails and Python/Django to make it much of a challenge to learn it? How
different is it from Ruby or Python?

------
pdelgallego
Have you think about learning how to write your own programming language. It
would give you a deep understanding in topics that would make you appreciate
other languages.

If you do the exercises till the metacircular evaluator in SICP book it will
teach you Lisp and about how to develop a naive lisp-1 interpreter. Its a
great exercise.

~~~
nithinbekal
I've wanted to read the SICP book, but do you think the book may be too
advanced for someone who knows next to nothing about Lisp and functional
languages?

~~~
pdelgallego
I think is ok, if you already know how to program. The SICP book is not the
easiest book ever, but is also not that complicate. SICP teach you many
things, not only lisp. YOu can also follow the lectures in the MIT open course
web[1].

If you dont feel comfortable with the SICP book (many people dont like it),
you can start with How to Design Programs(HTDP)[2]. It teach scheme/racket,
and is one of the better books to teach programming that I've seen, and the
people in the mailing list and irc channel are very friendly.

The good thing is that both of them are free[3], so you can take a look and
see if the fit your expectations.

[1] [http://ocw.mit.edu/courses/electrical-engineering-and-
comput...](http://ocw.mit.edu/courses/electrical-engineering-and-computer-
science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/)

[2] <http://www.htdp.org/2003-09-26/Book/>

[3] <http://mitpress.mit.edu/sicp/full-text/book/book.html>

~~~
nithinbekal
Thanks for the advice. I'll take a look at both of them and choose the one I'm
more comfortable with. Both the books look quite interesting.

------
mian2zi3
Learn a dependent-typed programming language like Agda or Epigram or Coq.

~~~
nithinbekal
To be honest, I had to Google those names to find what the languages were
like. :) Those are definitely going into the list of languages I would like to
take another look at some day.

------
HackrNwsDesignr
I'm going to try RoR, I hear it is a lot of fun, and as a programmer I want to
have fun with my work :)

~~~
nithinbekal
Yeah, developing applications with ruby and rails is a lot of fun. It's easy
to pick up the language, and once you know the basics of rails, building
complex web apps becomes incredibly easy.

