views:

328

answers:

4

At college, I gave the programming language course and the compilers course a miss. I have regretted that decision since. (especially after reading this blog post by steve yegge). Im considering going through - Essentials of Programming Languages. what other books/projects could help me understand what's really going on 'under the hood'?

+2  A: 

Once you understand them both, you are well off (I have yet to understand some parts...)

Yuval F
+2  A: 

I would recommend the classic Dragon book Compilers: Principles, Techniques and Tools as a good text on compilers.

Another classic: The C programming language by K & R delves into the workings of C, if you're into that.

You might also look at some text dealing with formal languages in general and automata, as a lot of the concepts are important when dealing with compilers. I don't have any particular recommendations for this, though

Rik
+2  A: 

You will get a lot of recommendations regarding the Dragon Book, but I sometimes wonder if people recommending it have ever read it, and if they have why they recommend it to a begimner - it is far too hard a read.

The best introduction to compilers I've come across is "Brinch Hansen on Pascal Compilers". It's an easy read, uses recursive descent which is easy for a beginner to understand, and the lessons learned can be easily tranferred to languages other than Pascal. Unfortunately, I think it's out of print, but you can pick up acopy on ebay or amazon.

anon
Well, I have read and TAed a course using the dragon book. It is indeed not light reading, but it is the reference on compilers. The book mentioned in the question is not light reading either. I believe lewap's recommendation is a good read as well.
Yuval F
The dragon book isn't so much a hard read as on a hard subject. There are gentler introductions, but there's really not that much you can say on parsing that's general, useful, and can be understood easily, particularly for a language not suited for recursive descent (and Pascal was specifically designed for a one-pass recursive-descent compiler).
David Thornley
Have you read the Hansen book I suggested - not only an easy read but makes an adimittedly difficult subject easy to understand. An even easier one is Peter Brown's "Writing Interactive Compilers and Interpreters", which describes the process using BASIc rather than Pascal, but I thought it to hard to find a copy to recommend.
anon
+4  A: 

I totally agree with Neil about the Dragon Book. If you're not really into compilers you'll probably give up reading it quite early. If you are interested in how compilers work I recommend:

http://www.cs.princeton.edu/~appel/modern/java/

It is really fun and easy to read with examples and exercises.

lewap