3 ms·
I don't understand the basis of your question. What does the bootstrapping process for a compiler have to do with "OSS's value proposition?" (By OSS I'm assumin
by enneff 12y ago
I don't understand the basis of your question. What does the bootstrapping process for a compiler have to do with "OSS's value proposition?" (By OSS I'm assuming you mean "Open Source Software"?)
To build gcc, you need a C compiler. To build Go, you need a Go compiler. To compile anything you need to start with some kind of compiler.
- leereeves 12y agoI think bdcravens means that to install Go from source on, say, a new Linux box, we will have to download a binary version of Go first, even though we probably already have gcc. What happens if this catches on, and PyPy replaces CPython, and other languages do the same? Hassles for those who prefer to install from source, and potentially a lot of duplication of effort writing compiler backends in every language.
- EugeneOZ 12y agoSo you think all compilers should be written in C exclusively?
- leereeves 12y agoNo, I was just pointing out a drawback. Of course there are advantages too. In this particular case, though, I wonder why the Go team is planning to spend a lot of effort rewriting an already existing compiler. Rewriting a popular project from scratch can be a dangerous temptation.
- pkroll 12y agoThey explain why in detail here: https://docs.google.com/document/d/1P3BLR31VA8cvLJLfMibSuTdwTuF7WWLux71CYD0eeD8/edit https://docs.google.com/document/d/1P3BLR31VA8cvLJLfMibSuTdw... Also, you don't have to download a binary of Go to compile the latest Go. You can download the Go source back when it was compiled by C, compile it, and then compile the later, Go-sourced versions, if for any reason you need to go that far.
- 4ad 12y agoThe compiler is not rewritten, it is automatically translated from C, to Go: http://golang.org/s/go13compiler http://golang.org/s/go13compiler http://talks.golang.org/2014/c2go.slide#1 http://talks.golang.org/2014/c2go.slide#1 https://www.youtube.com/watch?v=QIE5nV5fDwA https://www.youtube.com/watch?v=QIE5nV5fDwA
- nosefrog 12y ago> What happens if this catches on I don't understand your comment, because we already live in your nightmare scenario: http://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29#List_of_languages_having_self-hosting_compilers http://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29#L... In practice, it isn't a big deal. When was the last time you worried about the language your compiler was written in? > potentially a lot of duplication of effort writing compiler backends in every language. That's also the state of things for every compiler that doesn't use LLVM or compiles to another language.
- leereeves 12y agoI agree the installation issues are fairly trivial; they were just a response to the original comment. But the duplication of effort (which won't end when the "GoGo" compiler is ready to replace cgo), and a potential freeze in Go while "GoGo" catches up, are more serious drawbacks. Yes, that is a trade-off other compiler teams have made, and it may be the right choice for Go as well, but it should be (and no doubt has been) considered.