Re:SmallerC – Small, Simple, Self-Compiling, Single Pass C C...
by qznc on Saturday October 14, 2017 @03:03AM
(#15471114)
I think C is fine for a simple compiler. Why are algebraic data types so relevant? Pattern matching is nice, because switch statements plus unpacking is more verbose.
For big optimizing compilers you appreciate abstractions like C++ enables. for example, a data flow Analysis framework.
Re:SmallerC – Small, Simple, Self-Compiling, Single Pass C C...
by jmite on Saturday October 14, 2017 @12:15PM
(#15472797)
Algebraic data is just so perfectly suited to abstract syntax. It's clearly possible to model an AST in C, but not to do it in an ergonomic z typesafe way.
For big optimizing compilers you appreciate abstractions like C++ enables. for example, a data flow Analysis framework.