4 ms·
So, the TAPL ? :) https://www.cis.upenn.edu/~bcpierce/tapl/ https://www.cis.upenn.edu/~bcpierce/tapl/
by Drup 10y ago
So, the TAPL ? :)
https://www.cis.upenn.edu/~bcpierce/tapl/ https://www.cis.upenn.edu/~bcpierce/tapl/
- PaulHoule 10y agoThat's better than average if you are getting that as an undergrad!
- catnaroek 10y agoNot really. TAPL is a very useful book, but it won't teach you how to write a compiler, unless the only part of a compiler you actually care about is the type checker. The interpreters it describes (in the chapters titled “An ML implementation of <whatever>”) are ridiculously inefficient.
- Drup 10y agoA good amount of new toy-ish languages compile to another language (typically javascript), and introduce new semantics and new type rules. As parent said, small DSLs. You don't really need more than a typechecker and ast tranformations for that.
- nickpsecurity 10y agoYou have a link to a good guide for beginners on designing and efficiently implementing type checkers?
- catnaroek 10y agoThis is a nice introductory tutorial on how to implement Hindley-Milner type inference: https://github.com/jozefg/hm https://github.com/jozefg/hm This is a more advanced tutorial that illustrates a nice but tricky optimization that OCaml's type checker internally uses: http://okmij.org/ftp/ML/generalization.html http://okmij.org/ftp/ML/generalization.html Finally, TAPL's type checkers are pretty good. They aren't designed for efficiency, though. They're designed to closely follow the book's contents: http://www.cis.upenn.edu/~bcpierce/tapl/checkers/ http://www.cis.upenn.edu/~bcpierce/tapl/checkers/
- nickpsecurity 10y agoThanks for the links!