If the language is forward-compatible, yes. It could be different if new optimisations have been added, or the code generator has changed.
> Would it make a difference if you then rebuilt 1.5 using 1.5 built using 1.5 rather than 1.5 built using 1.4?
It should not, the 1.5 compiler should be stable and yield the same result whether it was built using a 1.4 compiler or a 1.5 compiler.
That's actually a common technique to look for regressions and validate the bootstrapped compiler. For instance to compile rustc you download a "stage 0" compiler at Vx which compiles a "stage 1" compiler using Vy > Vx source. That stage 1 compiler is then used to compile the stage 2 compiler from the same source. Stage 1 and stage 2 may not be identical since stage 0 and stage 1 may have different optimisations &al, so the stage 2 compiler is used to compile rust a third time, and that compilation is checked against the original stage 2 (and should be a fixpoint).
1. build bootstrap system with existing tools 2. compile full system with bootstrap 3. compile full system again with new compiler
Or something like that.
Edit/Note: The OP linked document is a pretty good explaination of the whole process as well as the implications ...
Edit: That's all assuming same version of the language being compiled. That's why they say the go1.x compilers may need to stay restricted to go 1.4 for their code.
P.S. See Linux From Scratch or osdev.org for more about this
It's a process we started more than a year ago: http://golang.org/s/go13compiler
Additionally it is a way to expose the language designers to possible issues in the language, as they will spend more time using it instead of other implementation language, which helps improving its design and tools.
Personally I tend to favour bootstraping, even if it is a little inconvenient when porting to new architectures.
It also has the benefit of the team implementing the language actually dogfooding it, causing natural evolutionary improvements.
I suspect Google is doing this with go for the same reasons.
On the other hand, a big risk is that the language will evolve towards being better at writing compilers, which is a highly idiosyncratic task.
You should be able to write an O'Caml compiler in javascript or a Haskell compiler in C.
Rewriting the compiler in C# has the advantage of now being able to offer the compiler as a service to the C# run-time but not sure I see how it could have affected the design of the language.
If 1.4 is going to become the bootstrap toolset, that also suggests that 1.4 will essentially become "long-term supported", meaning that if new ports require fixes to the bootstrap toolset (even in the cross-compilation) scenario, hopefully they'll accept those changes upstream.
For the foreseeable future, it must be possible to build the compiler with Go 1.4. That means the compiler must stick to Go 1.4 libraries and constructs (or use build tags for conditional compilation). It says nothing about which version of Go you have to use to build the compiler. If we're working on Go 1.9 and you want to use Go 1.7 as the bootstrap base, that's fine: Go 1.7 will build and run everything that Go 1.4 does. You just can't introduce any Go 1.7-specific code into the compiler.
I don't know if you've noticed, but there are very few language changes in each release. We're focused on improvements to performance and reliability more than new features. So I don't anticipate it being a hardship that the compiler is limited to Go 1.4. (And that's still much nicer than C.)
I don't feel like I have this backwards at all.
I wasn't commenting on it being a hardship to limit the implementation to Go 1.4's feature set.
Go is already very good at cross-compiling. That can be used to do a new port (as a trivial example, the fact that the compiler doesn't run on NaCl didn't hurt the NaCl port at all). There is a section in the doc explicitly about this. We are doing new ports too (like power64), and I don't anticipate the bootstrapping change slowing them down appreciably.
Shouldn't it be possible to port to a new system simply by porting Go 1.4 to that system? Once that base version is ported, a script can build 1.4, then build 1.5 and any succeeding base versions until the current version is reached.
Of course, system-specific features would have to be added for each go release beyond 1.4, but that would have to be done anyway.
What am I missing?
Does go not support being cross compiled/cross compiling?
Interviewer: Was there any concept of looking at each other's code or doing code reviews?
KT: [Shaking head] We were all pretty good coders.
http://www.theregister.co.uk/2010/04/21/ken_thompson_take_ou...
Indeed he is. All the more reason for code reviews. [;]
[1] http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=2b15d2ba7eb3a25...