logoalt Hacker News

tsimionesculast Wednesday at 6:16 PM1 replyview on HN

So you think people should start their programming journey by writing a compiler in assembly? What exactly should it compile, if they haven't learned any other language?


Replies

t-3last Wednesday at 6:23 PM

It's relatively common is university CS courses to build a compiler after the basic intro and architecture courses. It's one of the simpler projects (yes, really, compilers are rather simple, optimization is the hard part) that involves a lot high-level concepts and exposes a lot of the thought behind things otherwise obscure. A compiler for a simple 4-function calculator is enough to start with, then higher-level constructs can be added easily while introducing them.

show 1 reply