(no title)
ralph
|
12 years ago
Sorry, I don't understand. You seem to be saying there's only two versions of the compiler, one written in a foreign language, e.g. C, the other in a subset, e.g. Gosub, called G-2. But then there's "whatever is the current version of the language", which suggests to me incremental improvements, e.g. the language develops as experience is gained rather than being fully planned on day one. So doesn't G-2 undergo changes to implement these? You may keep calling it G-2 but there are many (I never said thousands) of versions of it.
pjmlp|12 years ago
Now that Go 1.0 release exists and is stable. One could write a Go compiler using Go 1.0.
Eventually the compiler will reach a state that it can fully compile Go 1.0.
Now replace the C implementation of Go 1.0 by this new compiler and use it to write Go X.Y using only Go 1.0 features.
When the need to target a new OS or CPU arises, add a new backend that generates code for the desired target system in the Go 1.0 compiler.
Use the cross-compiler to compile itself with the new backend. Copy the binary to the new system, now use the Go 1.0 compiler to compile the Go X.Y version, whatever X and Y are.
You don't need to use multiple versions of the language and by keeping the feature set of base compiler small, it makes it easier to write cross-compilers.
ralph|12 years ago