4 ms·
I say Haskell, the way you can build abstract syntax tree's as data types and do pattern matching on them is a very natural way to write a compiler, it is almos
by tomh- 16y ago
I say Haskell, the way you can build abstract syntax tree's as data types and do pattern matching on them is a very natural way to write a compiler, it is almost a one-to-one match with a language definition.
- hga 16y agoScheme has traditionally been a if not the major language for doing this, but it was established in this niche well before Haskell got big (Scheme had a decade and half head start on Haskell, three decades if you want to go back to the invention of LISP). On the other hand there's a tradition of dogfooding in this area, one argument being that if your (general purpose, let's assume) language isn't good for building a compiler, what use is it? If you believe in your language....
- sea6ear 16y agoThanks, this seems like a good argument that I hadn't considered. I like pattern matching a lot so this appeals to me.