BT

Your opinion matters! Please fill in the InfoQ Survey!

Google Discusses Go 2

| by Abel Avram Follow 4 Followers on Jul 15, 2017. Estimated reading time: 2 minutes |

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:

go-process

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

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT