Re:Swift and Go: Building a Fast Future
by cromwellian on Tuesday November 18, 2014 @08:31PM
(#8627659)
Seems 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.
The 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.
Re:Swift and Go: Building a Fast Future
by astrange on Tuesday November 18, 2014 @11:12PM
(#8628212)
gccgo 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
The Go developers have claimed LLVM was not useful because it's too slow, which is why they used the plan9 compiler style.
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
. 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.