Hacker News new | ask | show | jobs
by ClassicFarris 4034 days ago
Can some one answer this question. It says that Go1.4 will be needed to compile Go1.5. Does this mean that Go1.4 will always be needed, even for Go1.6 and beyond? So are they essentially locking things to the Go1.4 "C" code, then updating on top of that?
2 comments

No, any newer version works. You can build 1.5 with 1.5, you will be able to build 1.6 with 1.5 and 1.6.
Right, but if someone surreptitiously deleted all Go compiler binaries from the world, then we'd have to go back to compiling the C source of 1.4...

Of course, that's the nature of bootstrapping! If someone managed to erase all the software from all the computers in the world, we'd have to go back and find an "Old world" Mac and use the on-die Forth compiler to write a C compiler so we could start compiling things again.

Provided people didn't forget. Recreating from memory will take a fraction of the time. I would go for a lisp interpreter in assembly then implement a c compiler in that.
Yes, and thanks to version control that would take, what, maybe a few minutes?
Not if all the binaries for the version control systems also go missing :)
Yes. It means that anytime you want to add a new supported architecture, you'll need to bootstrap through Go 1.4.

Otherwise, I'm guessing that for Go 1.6, they'll rely on you having a binary distribution of 1.5 (probably from your distribution, or their website), etc.

>It means that anytime you want to add a new supported architecture, you'll need to bootstrap through Go 1.4.

That's not true at all, (1) you write the backend for the target machine, (2) you recompile the compiler with the new backend included on a supported host, (3) then use the new compiler to compile itself for the target using the new backend, (4) you now have a compiler that runs on the target.

Same process is used to port C compilers (or any self-hosting compiler, really).

I think it would be much more likely that new architectures would be added as cross-compilation targets than to work back through a v1.4 bootstrap.