Was this book written in the '70s or '80s? Single-pass compilation is great in some ways (memory and time efficient), not in others (usability). C is (sort of) single-pass (if you don't count the preprocessor, optimization passes, etc), which is why you need function prototypes. Assemblers are very often single-pass. C is basically a user-friendly front-end to the assembler anyway, so.
Languages built for the the minicomputers of the '70s and microcomputers of the '80s should be designed for a single pass, because if you were trying to do anything bigger than that it would likely take forever or exceed your available resources. I don't think that has been a valid constraint on anything for a long time unless you're planning on e.g. compiling something on an AVR (for example, Forth is a single-pass language if you squint at it hard enough, and it fits nicely on some REALLY small things). - Dave > On Feb 27, 2019, at 6:46 PM, ivan.medoe...@gmail.com wrote: > > Thanks, Ian. > > I remember reading in some compiler book that languages should be designed > for a single pass to reduce compilation speed. > > Go proves that wrong :) It's amazingly fast, looks like computers are pretty > good at traversing AST trees. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.