3 ms·
I think the greatest features of the ML family for compiler development are great AST representations (as algebraic data types) with pattern-matching. When you
by Peaker 11y ago
I think the greatest features of the ML family for compiler development are great AST representations (as algebraic data types) with pattern-matching. When you change the AST, it is very easy to go and fix all the AST transformations to handle less/more cases or fix the types.
There are other great features for compiler development in the ML family, but almost all of them revolve around static types.
Can you explain what you mean when you say Lisp is excellent for compiler development? When changing the AST, how would you go about changing all the code that needs to be changed?
- sklogic 11y agoML got ADTs and pattern matching out of the box. Fine. With Lisp you can quickly build your own ADTs, with some enhanced functionality which is not possible in *ML family. See a couple of examples of this: [1] http://www.cs.indiana.edu/~dyb/pubs/nano-jfp.pdf http://www.cs.indiana.edu/~dyb/pubs/nano-jfp.pdf [2] https://github.com/combinatorylogic/mbase https://github.com/combinatorylogic/mbase