Metaprogramming for Madmen: http://t.co/EUNbGIvZia Well worth a read, discusses the fun of writing a C++ parser.
Related Posts
Counter-intuitively, if you're writing a parser for a programming language, you need it to be a total function. As soon as you build IDE tooling, you need ASTs from invalid or incomplete input.
The parser should return (Ast, List<Error>) rather than Result<Ast, Error>.
I'm having fun writing a simple type checker, but I'm learning firsthand why syntax-directed checking doesn't work. It prevents inference.
My checker catches real bugs, but it can't handle cases like this:
[1, 2].map(fun(x) { x + 1; })
I think I need bidirectional checking.
Do any tech streamers try new software live? It'd be a really fun way of doing UX testing.