News for hackers. Stuff that matters.
Re:What can we learn from how compilers are designed? by seanmcdirmid on Friday March 16, 2018 @11:40PM (#16605492)
You can traverse the AST via internal functions (in OO terminology, virtual methods that make the case matching implicit on this). It really isn't much of a problem if the functions are typecheck, codegen, execute, etc...

I don't really get the appeal of using giant mega case matches in a compiler.

Re:What can we learn from how compilers are designed? by qznc on Saturday March 17, 2018 @03:12AM (#16605921)
AST transformations are a exemplary instance of the Expression Problem. Solutions in mainstream languages, eg the Polyglot framework for Java, lead to ugly overengineered code. Writing AST transformations with multimethods might be nice.