Hacker News new | ask | show | jobs
by z29LiTp5qUC30n 1978 days ago
But compilers are not hard but simple state machines.

If you don't believe me, look at cc_x86

https://github.com/oriansj/stage0/blob/master/stage2/High_le...

2 comments

...or in other words, "they're hard only because you make them hard".

That said, I think C4 makes a better example of how simple it can be:

https://github.com/rswier/c4/blob/master/c4.c

(Previously on HN at https://news.ycombinator.com/item?id=8558822 and https://news.ycombinator.com/item?id=22353532)

You can say that about everything.

"But X is not hard. It's just number theory" - while X is Fermat's Last Theorem