5 ms·
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 beyon
by ClassicFarris 11y 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?
- andrewchambers 11y agoNo, 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.
- jballanc 11y agoRight, 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.
- andrewchambers 11y agoProvided 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.
- rsc 11y agoYes, and thanks to version control that would take, what, maybe a few minutes?
- ufo 11y agoNot if all the binaries for the version control systems also go missing :)
- Aissen 11y agoYes. 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.
- jballanc 11y agoI 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.
- EdiX 11y ago>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).