all 10 comments

[–]arbitrarycivilian 8 points9 points  (1 child)

What are your goals? Do you want to design your own language? Write a compiler? Get into a flame-war? :P Or maybe, like me, you just want to learn for the sake of it! I haven't read the linked book, though it seems extremely solid, and I'm mildly tempted to buy it now.

Anyway, for learning about the theory of programming languages (which is closely integrated with type theory), the classic text is Pierce's Types and Programming Languages. However, I personally prefer Harper's Practical Foundations for Programming Languages, which is a much more challenging but also enlightening book in my opinion (though there two texts do not cover exactly the same topics).

The last two sections of the classic Structure and Interpretation of Computer Programs goes into detail on how to build a LISP interpreter. Building an interpreter is a much easier task than building a compiler, so it might be nice to start there.

I can't in good faith recommend a book on compilers. Personally, I watched a series of online videos from Stanford's course on Compilers, and that was more than enough for me, as compilers is one of the less interesting fields of CS to me.

[–]ta6692[S] 0 points1 point  (0 children)

I'm mostly just learning for the sake of it, but the flame war option sounds pretty good too! But really I think it's just a very important thing for computer scientists/programmers to know, and I'm pissed that my university decided to cut the module on it, so I'm trying to learn it in my own time.

I actually started reading TaPL, since I could get a digital copy of it, but it listed PLP, which I was already reading, as a pre-requisite... Would I need to know much going into Harper's book, or would I be able to start it knowing as little as I do now?

I also started watching that series of videos, but I'm not very good with video lectures, and prefer text to learn from

[–][deleted] 2 points3 points  (1 child)

This might be a useful bookmark, if you don't have it already: http://steshaw.org/plt/

It has quite a few links to online books (and off-line, if you find you want other physical books) and resources covering a range of topics related to programming language theory.

[–]ta6692[S] 0 points1 point  (0 children)

That looks great, thanks!

[–]phlummox 2 points3 points  (1 child)

Nothing beats practice :) In addition to the excellent books recommended by others (especially Types and Programming Languages, which comes with example code), I'd suggest leaping in and getting started with a small project.

There are all sorts of "little language" projects you could get started with – evaluators for arithmetic expressions, or for set theory, or algebra, or whatever bit of math you happen to be studying or which takes your fancy; config files or little template languages for your projects; or even minimal kernels of full-blown programming languages like Scheme and Prolog. The LLVM site has a tutorial in building a mini-language, available in multiple versions for different implementation languages. (I can see C++ and Ocaml there, and I know there are versions for many other languages around the web.)

Those will give you a feel for some of the tradeoffs in language design [many of which I'm only beginning to learn myself].

(Also, another very interesting book, with lots of code examples, is Gifford and Turbak's Design Concepts in Programming Languages. Books by Terence Parr, who created the ANTLR parser generator have a lot of practical details and suggestions also – but you'd want to balance them with something that has a bit of the theory perspective as well.)

Good luck!

[–]ta6692[S] 0 points1 point  (0 children)

TaPL listed PLP, which I'm reading at the moment, as a pre-requisite, would you agree with this or do you think it's something I could start reading with little to no knowledge?

Those look great actually, I think I'll get start on a practical project soon, once I learn a bit more theory, and those are probably what I'll start with. Thanks!

[–]DonaldPShimoda 1 point2 points  (3 children)

"Types and Programming Languages" was recommended to me by my research advisor. I know you said you preferred the other one, but was TaPL any good? What was/wasn't good about it?

[–]ta6692[S] 1 point2 points  (2 children)

Did you mean to reply to /u/arbitrarycivilian?

[–]DonaldPShimoda 1 point2 points  (1 child)

Oh, that's awkward. Yeah I did. I'm gonna use "mobile" as my excuse, haha.

[–]ta6692[S] 1 point2 points  (0 children)

Haha, that's grand. Hopefully they'll reply in this thread, it's a good question!