BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Should you really learn another language?

Should you really learn another language?

This item in japanese

Blogger Gustavo Duarte cursed in church when he said that learning new programming languages is often a waste of time. He initially called his post, “New Languages Considered Harmful”, a wordplay on Dijksta’s classic paper on gotos, but after the reactions he got, he toned it down a bit and it’s now called ”Language Dabbling Considered Wasteful”.

Learning new programming languages is often a waste of time for professional programmers. It may be a fun waste of time (i.e., a hobby), but it’s a waste nonetheless. If you do it for pleasure, then great, but profit is scarce. Pointing this out among good programmers is heresy: even the pragmatic programmers, whose teachings are by and large excellent, suggest we should learn one new programming language every year. That’s rubbish.

He also explains why he thinks it isn’t useful, by saying:

The theory is that by learning a new language you “expand your mind” and become “a better programmer”. Right. By that kind of argument we should all be eating LSD (don’t). In reality learning a new language is a gritty business in which most of the effort is spent on low-value tasks with poor return on time invested.

Gustavo criticizes Scott Hanselman’s analogy that learning new languages is like sharpening the saw. Scott said:

This year, I’m learning Ruby. Does that mean my team is moving to Ruby? Probably not, but it does mean I’m learning Ruby this year because I believe in sharpening the saw. You might be too busy sawing to sharpen, but I’d encourage you - no matter what brand or type of saw you use - to remember that there are other folks out there cutting wood successfully with a different kind of saw. Maybe they know something that you don’t.

Gustavo doesn’t believe that’s the way it works out.

Scott Hanselman argues that learning a new language is sharpening your saw, but I see it as neglecting your half-sharpened saw while playing with the dull, new, shiny one. The upfront cost is not the only one either. It’s better to have 3 razor-sharp saws than 8 so-so ones. Each new language you add to your toolbox is making it harder for you to become furiously productive in any given language.

That spawned off discussions all over the web.

Most of the interesting comments were made at Hacker’s news, a part of the Lisp evangelist Paul Graham’s yCombinator site. Scott Schneider starts of the comments by saying:

I think he’s operating with the assumption that all languages have the same concepts, just with different “lexical and syntactical bureaucracy.” But I think the point of the advice to learn more programming languages is to expose yourself to different programming paradigms. And in order to do this, I don’t think you need to become an expert in the nuances of that language, but you need to become comfortable in thinking in new ways.

Steven Hazel continues:

I think “enough” is a crucial point here. The author almost seemed to be arguing against switching to a new language every year, which I agree is ridiculous. The idea is to learn some new concepts, not to write significant programs in a new language every year. I only adopt new languages for regular work if they’re the pragmatic choice.

Alain Perils’ stated in the classic Epigrams on Programming that “A language that doesn’t affect the way you think about programming, is not worth knowing.”, which goes well with Eric Raymond’s finding:

Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot.

That quote is what starts off Paul Graham’s famous article “Beating the averages” where he introduces “The Blub Paradox”. From the article:

After a certain age, programmers rarely switch languages voluntarily. Whatever language people happen to be used to, they tend to consider just good enough.

The Blub Paradox is about the theory that everyone knows why they chose their language(s) of preference, most often since it’s so powerful. They chose C over machine language for the programmer productivity, or maybe Java over C for the abstractions and thereby the programmer productivity. There are of course other languages they hear about but they think “There is no problem I can’t solve in my language, I see no reason to learn another language”.

The programming languages, or rather language types, you understand (not necessary is most fluent in), tends to steer your thinking. According to natural language researchers, if there is a word missing (or a category of words) from a language, people have a hard time thinking about the concepts that the missing words represents. Paul Graham states approximately the same thing about programming languages.

Programs that write programs? When would you ever want to do that? Not very often, if you think in Cobol. All the time, if you think in Lisp.

So, should you spend time learning new languages or not? And if you decide you should, how do you choose your next language to get maximum effect?

Peter Norvig, Director of Research at Google, wrote an article called Teach Yourself Programming in Ten Years where he gave explicit advice on how to choose languages to learn:

Learn at least a half dozen programming languages. Include one language that supports class abstractions (like Java or C++), one that supports functional abstraction (like Lisp or ML), one that supports syntactic abstraction (like Lisp), one that supports declarative specifications (like Prolog or C++ templates), one that supports coroutines (like Icon or Scheme), and one that supports parallelism (like Sisal).

So, what’s your opinion? Will you be learning new languages or is it a waste of your time?

Rate this Article

Adoption
Style

BT