BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Google's Go Readies 1.1 Release

Google's Go Readies 1.1 Release

Leia em Português

This item in japanese

Lire ce contenu en français

As Google's Go programming language version 1.1 nears release, the developers have announced the release of the latest beta, providing a working preview of its new features. Not least among these is an estimated speed increase of 30%-40% in several use cases. Version 1.0 of Go was released a little over a year ago in March 2012, and to this point Google has released bug fixes but version 1.1 will bring new features while upholding their commitment to backwards compatibility with 1.X version. The updates affect the toolset, language features, and changes to the standard library.

New Language Features

  • Integer division by zero
  • Method values
  • Return requirements – Previously functions that returned a value required an explicit “return” or call to panic, this has been relaxed with the addition of terminating statements.

Tools / Implementation

  • gccgo – Version 4.8 of GCC (GNU Compiler Collection) released in March 2013 has partial Go 1.1 support, while the upcoming GCC 4.8.1 scheduled for release in May should provide complete 1.1 support.
  • int/unit on 64-bit implementations now defined as 64-bit. This could issues for programs expecting these types to only be 32-bit.
  • Heap size - On 64-bit systems this has been expanded to tens of gigabytes (exact size system dependent and not finalized)
  • go command
    • Error messages for compiling, testing, and running code are more descriptive
    • $GOPATH must be set in order to use go get, and it is no longer acceptable for it to be equal to $GOROOT
  • go fix has been adjusted to support migrating of code from 1.0.X to 1.1. (Pre 1.0.X code cannot be upgraded directly to Go 1.1)
  • Race detection – developers battling with race conditions will benefit from using new option -race with go test. It is currently available for the 64-bit platforms Linux, OS X, and Windows.

Go's developers report significant performance increases in several (but not all use cases). These increases are brought about by improvements to the compiler's code generation, a better map implementation, fewer context switches in networking applications, and an improved garbage collector.

Downloads for major platforms (Windows, Linux, OS X, etc) are available now for 1.1 Beta 2. Keep in mind that development is progressing at a brisk pace so newer versions can and will appear. Developers should be able to take advantage of the new 1.1 features by recompiling their existing code.

Rate this Article

Adoption
Style

BT