4 ms·
For what it's worth, the go team's plan is to automatically translate the compiler to go, not to rewrite it from scratch: http://talks.golang.org/2014/c2go.sli
by riwsky 12y ago
For what it's worth, the go team's plan is to automatically translate the compiler to go, not to rewrite it from scratch:
http://talks.golang.org/2014/c2go.slide#18 http://talks.golang.org/2014/c2go.slide#18
And, the gccgo compiler does leverage gcc, assuming that counts as a mature compiler:
http://blog.golang.org/gccgo-in-gcc-471 http://blog.golang.org/gccgo-in-gcc-471
. Neither of these contradict your implicit point of "they chose to invest time in this port instead of trying to maximize performance ASAP", but you still might want to know.
- cromwellian 12y agoSeems weird to fork a compiler like gcc or clang via transpilation, because you split the community. It may be faster to iterate on Go, but will all of the compiler contributors on GCC or Clang/LLVM want to switch to editing the go version? It seems you'd lose out on picking up improvements from the main compiler branch and have to keep transpiling and gardening in patches. Plus upstreaming improvements would also be irritating. I'd think a Go frontend to LLVM would be optimal in terms of productivity.
- e12e 12y agoThe go compiler is based on the plan9 c compiler, not gcc. I'm not quite sure what the story is with gccgo (who initiated it, why) - but i think it was for interfacing with c on non-plan9 architectures, and not really about leveraging gcc optimizations.
- astrange 12y agogccgo was written by a gcc developer for the purpose of trying out new ways to write a frontend, but also to use all the various things gcc has. https://blog.golang.org/gccgo-in-gcc-471 https://blog.golang.org/gccgo-in-gcc-471 The Go developers have claimed LLVM was not useful because it's too slow, which is why they used the plan9 compiler style.
- MetaCosm 12y agoGo is a spec, not a compiler.