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. On Wednesday, February 27, 2019 at 11:50:05 PM UTC+1, Ian Lance Taylor wrote: > > On Wed, Feb 27, 2019 at 2:42 PM <ivan.m...@gmail.com <javascript:>> > wrote: > > > > In Go functions can be used before they are defined, but as I > understand, it's still possible to have a single pass compiler. > > I don't think it's possible to compile Go in a single pass compiler, > unless you consider a separate parsing and code generation step to be > a single pass compiler. In the general case, you can't generate code > for any Go function until you've seen all the functions in the > package. > > There are multiple Go compilers. All the ones I am aware of are have > many passes. > > Ian > -- 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.