Practical intro to type theory

I’ve been using strongly, statically typed languages most of my life. But after I began using Rust, and especially digging into some internals discussions, I started to feel like I could really use some theory to understand the language and concepts behind it better.

As many other software developers, I’m self-taught, but try to fill in my blanks and enjoy good books that combine theory with practical approach (like the classic dragon book or SICP, for example). What’s a good resource to learn type theory to a reasonable degree so I can understand Rust current state and it’s development better? May be there’s some classic book on the subject that’s considered a must by the community? I would be thankful for any suggestions.


The book Types and Programming Languages, by Benjamin C. Pierce has been recommended by many people as a good introduction to the topic.


For how programming languages work I like Programming Language Pragmatics, which apparently expanded its coverage of type systems, particularly inference, for its 4th edition:


It’s been an alarmingly long time since I took discrete math and logic – personally, I found Types and Programming Languages to be a bit challenging, and am planning on returning after some mathematics refresher. It definitely seems well written and comprehensive, but the assumed familiarity with, e.g., set theory notation was making it quite a slog.

YMMV, of course. :slight_smile:

I’ve been trying Type Theory and Functional Programming. The book was too expensive to edit and release (there was not enough people buying it maybe?), and so the author decided to give it away for free.

A friend recommended it to me and so far, it’s been a good learning experience :3

Also, do take a look at the Errata when and if you decide to do the exercises, because there are many typos there that the Errata fixes :raised_hands:t2:

1 Like

Ohhh type inference! I’ll take a look :sparkling_heart: