4 ms·
I don't really get the motivation behind this effort. I'm not very familiar with the Go compiler, but it seems like make-work. > It is easier to write correct
by bluesnowmonkey 13y ago
I don't really get the motivation behind this effort. I'm not very familiar with the Go compiler, but it seems like make-work.
> It is easier to write correct Go code than to write correct C code.
But the correct C code is already written.
> It is easier to debug incorrect Go code than to debug incorrect C code.
Is the C code incorrect? How much debugging is left to be done?
> Work on a Go compiler necessarily requires a good understanding of Go. Implementing the compiler in C adds an unnecessary second requirement.
The compiler is already implemented in C.
> Go makes parallel execution trivial compared to C.
Is it not trivial to run multiple C compilers in different processes?
- mcpherrinm 13y agoThe compiler certainly has bugs. It has features yet to be added. It could be faster, use less memory, and be friendlier. Your arguments would hold a little weight maybe if there were no plans to continue Go development, but I doubt that is the case.
- pcwalton 13y ago> Is it not trivial to run multiple C compilers in different processes? I think the design doc is talking about using shared-memory concurrency to do parallel codegen on a per-function basis (like some LLVM patches are experimenting with doing). In this regard it's easier to set up the infrastructure needed to farm out concurrent tasks in Go, because C has neither built-in channels nor the generics to conveniently build them.
- enneff 13y agoThe compiler is still in a relatively early stage of its development. At this point we feel we can make faster progress and attract more contributors if it is written in Go. (Go programmers like to write Go code, who'd have thought? :-)
- thomasahle 13y agoGood point about attracting developers. I guess Ken and Rob will eventually want to seek other challenges and leave Go to the youngsters and free software community.
- enneff 13y agoNeither Ken nor Rob actively work on the compilers today. There are about 6 people in the Go community that regular hack on the compiler, yet the project has more than 100 active contributors. One goal of this change is to make the compiler sources more accessible to them.
- asmman1 13y agoWell, "attract more contributors if it is written in Go" I think that it isn't the point really. In fact, I think it's more easier if you're using C than or even C++. The question about C it's much error-prone language which would make development slow than using a more modern language with the C string and malloc()s pain. Not mentioned that it's cool a Go compiler written in Go and C# compiler written in C# :)
- MBlume 13y agoI think they left off an important reason, which is that if an engineer is spending most of their time working on Go, and Go's written in C, then they're making decisions about Go without actually spending a lot of time writing Go programs. Better if the people driving Go are spending all day writing Go programs.
- agumonkey 13y agoI can't remember where[1], but someone said something like "if I did write this in C I would never dare to touch it ever again". You don't want to feel stuck in a dead-end. [1] I think it was the scala compiler video rant recently published, or maybe SPJ on GHC.
- lmm 13y agoIf you find it please say so, that sounds like something I'd be interested in reading.
- fauigerzigerk 13y agoOn HN we get tons of "why we moved from language/platform X to language/platform Y" articles. They are fun to read, but 99% of it should be read as a list of post factum rationalizations of irrational decisions. You have to give the Go team credit for telling the truth in their last bullet point: Go is much more fun to use than C I actually think the other bullet points are correct. I just don't believe they are the reason for making the decision.