Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Google Discusses Go 2

Google Discusses Go 2

This item in japanese


At GopherCon 2017 which took place this week, Russ Cox, the tech lead for Go at Google, keynoted on the future of Go, inviting the community to submit suggestions on what should be included in the next major version of the language.

Google started working on Go almost 10 years ago, and the first stable version 1.0 was made available five years ago. Now, the current stable version is 1.8.3, and Google is opening up to the community to hear what should be included in the next major version, 2.0.

A recent study estimates the number of Go developers at about 500,000. If one asks all these developers what they want in a programming language, there are chances we would end up with a very long list of desirable features. But Google is very concerned with maintaining compatibility with the existing Go codebase, roughly approximated at 1B LoC. While this shows the language’s success, according to Cox, it is also "the main constraint on Go 2."

Go 1 came with a Compatibility Promise, which gave developers peace of mind that their programs will continue to compile and run correctly as long as the Go 1 specification is in place. Now, the Go 2 specification is to be designed, existing the possibility to break compatibility with 1.x. Cox considers that new features need to be carefully selected because:

Go 2 must bring along all those developers [including those using Go 1.x]. We must ask them to unlearn old habits and learn new ones only when the reward is great.

Go 2 must also bring along all the existing Go 1 source code. We must not split the Go ecosystem. Mixed programs, in which packages written in Go 2 import packages written in Go 1 and vice versa, must work effortlessly during a transition period of multiple years. We'll have to figure out exactly how to do that; automated tooling like go fix will certainly play a part.

To avoid disruption Google will limit the number of new features to "two or three, certainly not more than five," and "each change will require careful thought, planning, and tooling." Such features do not include minor changes such as "allowing identifiers in more spoken languages or adding binary integer literals," because "they are easier to get right." Cox talked about major changes such as "additional support for error handling, or introducing immutable or read-only values, or adding some form of generics, or other important topics not yet suggested."

From Google’s perspective, the main target for Go 2 is "to fix the most significant ways Go fails to scale." Cox mentioned both production scale, running concurrent applications in a cloud setting, and development scale, with many developers working in parallel on large codebases.

Much of the keynote was spent presenting and explaining the 5-steps process used to modify Go:


For more details on this process we recommend reading the blog post Toward Go 2. Those interested in suggesting new features for Go 2 are invited to do so using the language’s Wiki on GitHub.

Rate this Article