Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Christopher Diggins

Dr. Dobb's Bloggers

Learn as Many Languages as You Can (or just learn Scala)

March 16, 2008

Nick Plante recently reminded me in his blog of the advice in Pragmatic Programmer to learn one programming language a year.

I say why wait? If the Sapir-Whorf hypothesis has any bearing on computer programming (which I believe it does) then you can give your programming skills a big boost by cramming a bunch of languages in your head now.

However, you need to leave your safety zone and learn a properly disjoint set of languages so that you can effectively expand your thinking, and deepen your general understanding of programming.

Assuming like many of us you are of a predominantly C++/Java background then I recommend learning the following languages in roughly the following order, and as quickly as possible.

  • Ruby - Ruby does a great job of showing how powerful a dynamic language can be, and leverages powerful ideas from Smalltalk, Perl, and Lisp.
  • Scheme - Scheme is a dialect of Lisp with some pretty hardcore implementations. Make sure you can wrap your head around call/cc and be sure to learn what "lambda" does and what the different "let bindings" are for.
  • PostScript - PostScript is a neat way to experience the power of stack-based programming. It looks like a toy but it isn't, millions of printers around the world run it all the time.
  • Prolog - Prolog can make solving a large class of  programming problems a snap to solve. It is also easy to implement in your language of choice.
  • ML - ML is one of the favourite languages used by computer scientists. I suggest learning algebraic data types (sum types and product types) then to move on quickly to Haskell.
  • Haskell - I find Haskell makes the most sense only after knowing Scheme and ML. Go crazy with pattern matching, but avoid using monads unless absolutely neccessary because they are cheating! You will be sorely tempted to resort to using them all over the place.
  • Erlang - See how easy distributed programming can be.

Getting some experience in this set of languages as soon as possible, would really catapult you forward to a new level of programming. You will gain new insights into solving programming problems in whatever language you happen to be using. It will also make transitioning between languages a snap.

Of course, not everyone has the time to or energy to learn a whole set of new langauges. So if you have to choose only one new language for the time being then my recommendation is Scala. Scala is very accessible to programmers from different backgrounds. Scala provides access to type inference and advanced techniques used in languages like Haskell, but still supports common Java idioms and dynamic programming.

The Scala by Example [pdf] online book for example was heavily influenced by the the famous Scheme book: Structure and Interpretation of Computer Programs. The fun thing about Scala, is that you can slowly introduce yourself to new concepts and still be an effective programming using a programming style that you are more accustomed to. The more time you spend with Scala, the more you realize that you can do with it, and it can take you quite far.

For the highly motivated, I have compiled a list of URLs at http://www.plre.org/languages.html of roughly a hundred programming languages if you want to survey the landscape of programming languages more thoroughly.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.