That's an interesting causality. It implies that in 1990 when Ken started writing the compiler he knew it was going to be converted to Go. I doubt it.
The more likely explanation is that the same people wrote the compiler in C and designed Go. The subset of C they found most useful is the one they used in the compiler and the same one whose semantics ended up in Go.
Plan 9's userspace was originally written mostly in Alef, a predecessor of Go, then translated to C. I wonder if the original version of the C toolchain was in Alef, too.
Unfortunately I don't think there is a easy way to check.
Not true. Plan 9's user space was written in C. Alef came later and was used for only a few programs. The bulk were still in C, including the compiler toolchain. The Alef compiler was written in C too, never in Alef.
In the second edition Plan 9 release, the last one with Alef, these programs were written in Alef: acme, aux/consolefs, aux/depend, httpd, md5sum, page (document viewer), postscript/tcpostio (driver for lp), and ppp.
I think he was suggesting that you wrote the compiler to use only the parts of C that could be converted to go, not that C was written to be convertible to go.
Yes, and my point is that parts of the compiler date back to 1990.
Re:Go 1.3+ Compiler Overhaul
by thinkpad20 on Wednesday December 18, 2013 @11:24PM
(#6932863)
A compiler with no unions is surprising. At least for parsing, I've found unions to be almost indispensable.
Sounds like they had this idea in the back of their minds from the beginning, and wrote the C code accordingly.