Thursday, July 1, 2010

Why learn Compiler Implementation?

Yesterday a friend called up and asked what I was doing and, among other things, I said " I am building a compiler for a language with features X, Y and Z". He replied "But why do that?".

Well I like building compilers, interpreters etc but there are good reasons why "mainstream" programmers should learn this stuff.

As Hal Abelson of MIT (co author of SICP ) said

"If you don't understand compilers, you can still write programs - you can even be a competent programmer- but you can't be a master"

Steve Yegge has an interesting, if more verbose, post at

One minor side effect of knowing this stuff is that you are immune to language fads. The local fanboi crowd is jumping off the somewhat creaky Ruby bandwagon and onto the gleaming Clojure one. Watch out for a lot of half baked blather on the wonders of Lisp by people with not much of a clue. But it will be amusing and help pass the time.


zenmed said...

Completely agree. The compiler class i took at college was the most useful one from a practical standpoint. Learning compiler theory rewires your brain w.r.t how you think about programs.

Mohan Radhakrishnan said...

Are there any compiler courses conducted in India ?

Ravi said...

I don't know if there are any courses conducted in India. I'd rather get a book and learn by myself than attend a course.