deadends-of-it
deadends-of-it copied to clipboard
Go has one spec with multiple implementations
Re: One Spec, several Implementations
A nitpick. The go team specifically maintains a second implementation (gccgo) to ensure that the spec is the arbiter and not a specific implementation.
How true that is, is debatable. Gccgo e.g. uses as default 1 thread per go routine, while gc doesn't. Quite a big change in behavior! (You can use Gold to slightly improve it: https://go.dev/doc/install/gccgo#Gold but it's still not as expected.)
In practice, you are right. gc is clearly the first class compiler which everyone uses (just as linux is the only deployment environment in practice), but officially they still maintain that the spec defines the implementation, not vice versa. This is important for the backwards compatibility promise. If the implementation doesn't adhere to the spec, they will change the implementation - even if breaking compatibility. This prevents weird edge cases and mistakes from forcing their way in as permanent footguns.