r/ProgrammingLanguages • • 9h ago

Help Help with resources for learning

Hello everyone. I have learning about programming languages and compilers for over a year now and I have struggled finding useful resources for learning advanced topics.
I find things like type theory hard to follow (it’s not really the math, just that most resources don’t take the time to explain the implications of the theory in actual language design).
I have taken a look at crafting interpreters and the dragon book and have found them good resources but I wanted to know if there is any good central resource to deepen my understanding.
Thanks for taking the time!

4 Upvotes

5 comments sorted by

2

u/mamcx 8h ago

What topics are you looking for?

1

u/santi34mg 15m ago

Right now I think it is type theory and type systems but in general any good resource about programming languages. The resources that people have provided so far seem very promising!

7

u/GiveMe30Dollars 8h ago edited 8h ago

Disclaimer: after following Crafting Interpreters and making Lox twice, I jumped off the deep end by attempting to make a Haskell subset compiler. It's still ongoing and is likely to be so indefinitely lol. My focus is more towards type systems and semantic analysis + optimization rather than compiler frontend + backend.

This resource gives a quick overview on how to read the typing rules you see everywhere in these papers.

Typechecker Zoo is the crash course I took for understanding some common type systems. Don't worry if you don't understand everything at first! Take your time chewing through it. Start with the typed lambda calculus (Algorithm W) then System F. This would probably give you enough background to start learning about type systems independently.
(It's grown quite a bit since I last read it! Neat as the "starting page" if you want to get into any of the following topics.)

Thunderseethe's Making a Language is another end-to-end language implementation similar to Crafting Interpreters, with more focus on semantic analysis and optimization than the frontend + backend of a compiler. You may find it an approachable read.

5

u/SalubriousInsoucianc 9h ago

Types and Programming Languages by Pierce is my reference. Christiansen’s Bidirectional Typing Rules paper very short.

Programming Languages: Application and Interpretation is the most rewarding PLT text I’ve worked through. No focus on types or compilers that I recall. Not sure how to describe it. You’ll never again say a language is compiled or interpreted, for example.

2

u/Public_Grade_2145 1h ago

You should try the book "Essentials of Programming Languages" by Daniel P. Friedman and Mitchell Wand. It is great. It compares the implications of introducing feature by writing several interpreters. Though, it is less theoretic as compared to TAPL.

One example from the book, consider 2 procedure parameter passing methods.

  • call-by-value
  • call-by-reference

Call-by-reference is useful in implementing functions that mutates the arguments like swap, which is impossible in pure call-by-value languages. EOPL has an exercise ask you to implement the language such that it is call-by-values with some benefits of call-by-reference, allowing writing swap function. Actually, this motivates pointer construct.