4 ms·
Writing a type-checker is fun and pretty interesting. For that, I recommend you get acquainted with formal semantics and judgements (that's just the language fo
by harpocrates 10y ago
Writing a type-checker is fun and pretty interesting. For that, I recommend you get acquainted with formal semantics and judgements (that's just the language for describing type-systems). You'll probably be interested in then looking up
* simply typed lambda calculus
* Hindley-Milner type inference
* bidirectional typing
After that, there are all sorts of cool things like linear/affine types, system F, dependent types, etc. which can be picked up.
All of this (except maybe the first part) is easily learnable either from Wikipedia, the original papers, or recent tutorials.
- AlphaSite 10y agoNotes only tell half the story, but these are good notes on the first two topics. https://www.cs.cornell.edu/courses/cs4110/2016fa/schedule.html https://www.cs.cornell.edu/courses/cs4110/2016fa/schedule.ht...
- jnbiche 10y agoThose are very good notes that have come up frequently in my Google searches.
- krat0sprakhar 10y agoShameless plug: If you know OCaml, then I wrote this tiny implementation of Hindley-Milner[0] for a tiny functional language. It's (hopefully) very well commented, so it should clarify a bunch of concepts for newcomers. [0] - https://github.com/prakhar1989/type-inference https://github.com/prakhar1989/type-inference