If I wrote a blog / tutorial series about developing a language (with type inference, generics, etc.) + compiler from scratch in Rust, would people read it?
I would really love to see something like this! Dependent typing is a field I've not yet explored much, so any approachable literature / tutorials / blog posts about implementing them I'm sure would be most welcome.
Yeah, it’s not super hard! I also recommend https://cse.chalmers.se/~bengt/papers/GKminiTT.pdf… – the elaboration-zoo I linked has some of the best and most up-to-date toy implementations out there right now though, but lacks much prose to go with it right now.
I think you could do something cool where you could maybe flip between the implementation and the inference rules… to sort of teach people the correspondence. This is something that TaPL does a decent job of, but I still feel like I struggled without a teacher.
The big thing I was missing in my understanding reading TaPL is that the rules can be assembled into a tree, where the rules are nodes that slot together. The execution of the type checker follows that tree as it checks your program, with information flowing up and down the tree.
I think maybe it would be cool to try to teach that early on at the STLC stage… maybe you'd need to start off with arithmetic exprs like TaPL if you wanted to be really entry-level though 🤔