News for hackers. Stuff that matters.
Re:Writing a C compiler in 500 lines of Python by eru on Monday September 04, 2023 @10:58PM (#37387352)
What you are saying is true for a naive C compiler.

Once you want to optimize or analyse, things become more complicated.

> Compare that to, say, Rust, which would be pretty painful to single-pass compile with all the non-local behavior around traits.

Type inference also spans a whole function, so you can't do it in a single pass through the code. (But it's still tamer than in eg Haskell, where type inference considers your whole program.)

There are no comments on this comment yet.