News for hackers. Stuff that matters.
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.
Re:SmallerC – Small, Simple, Self-Compiling, Single Pass C C... by ufo on Sunday October 15, 2017 @07:31AM (#15476719)
In addition to being more succinct, algebraic data types are also better about warning if you forgot to handle one of the cases.