Paul Krill
Editor at Large

Google Go roadmap: What to expect in Versions 2 and 1.13

news
Dec 6, 20182 mins

Major themes emerging for Go 2 include support for better error-handling and generics

monopoly go language golang
Credit: William Warby

Builders of the Google Go language (Golang) are exploring directions for the language’s next generation. Major themes emerging for Go 2 include support for better error-handling and generics. While Go 1 was a small team effort, Go 2 will be more community-driven. Enhancements for Go 1.13 are also under consideration.

What’s planned for Go 2

Draft designs for these two areas have been published, although more exploration is needed. Error-handling in Go has had issues with too much error-checking boilerplate code and insufficient precise error reporting. The plan under consideration involves adding a check expression, to shorten error handling while keeping them explicit. A new handle statement defines what actions to take when a check fails, making it easier to add precise error reporting in a single place. Additional standard interfaces for error values also may be explored.

For generics, the goal is to address the problem with writing libraries that abstract away needless type detail by allowing parametric polymorphism with type parameters. Go’s builders want to make it possible to write useful libraries for manipulating arbitrary map and channel values and write polymorphic functions that can operate on both []byte and string values.

Proposals for Go 2 include suggestions for significant library or language changes, including some that do not meet the Go 1 compatibility guarantee. As of late November, there were 120 issues labeled as Go 2 proposals, ranging from generic programming facilities to having only one way of declaring variables. Some related proposals have been merged.

What’s planned for Go 1.13

Go’s developers are considering the following features, culled from Go 2 proposals, for the planned Go 1.13 release:

  • General Unicode identifiers, for developers using non-Western alphabets.
  • Binary integer literals and support for _ in number literals, to bring Go up to par with most other languages.
  • Permit signed integers as shift counts, to clean up code and get shift expressions more in sync with index expressions and the built-in functions cap and len.
Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author