BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Go Steadily Advances as Go 1.2 is Released

Go Steadily Advances as Go 1.2 is Released

Leia em Português

Lire ce contenu en français

The Go open-source programming language has released version 1.2 which delivers a combination of language revisions, improved tools, and changes to the standard library. Go has its roots in a research project at Google but today is used in production environments in several different companies and projects. This new release marks the pace of the language's steady progress as it comes roughly 7 months after Go's 1.1 release in May.

 

As previously reported, for 1.2 the two major language changes affect nil and slices. For nil, a runtime panic is now guaranteed to occur in certain situations compared to Go's previous behavior that would allow unsafe memory access. A new addition to slices means that capacity of a slice can be specified as well as length. Changes to existing code will not be needed for this change, but the change in behavior nil means that Go 1.2 may uncover faulty code that will need to be manually corrected.

 

The scheduler for goroutines has received pre-emption capability, in an attempt to mitigate the situation where one goroutine is able to starve out other goroutines running on the same thread. Separately the minimum stack size for a goroutine has been increased to 8KB and the maximum stack size is now configurable. The default maximum on 64-bit systems is 1GB and 250MB on 32-bit systems.

 

Users of Go on Windows and BSD platforms will be happy to see the networking performance gains that Linux and Mac OS X users received in Go 1.1 are part of the 1.2 release. According to the development team, these changes bring about a 30% performance improvement. All users of 1.2 should see performance gains with Go's implementation of bzip2 decompression and the JSON encoding.

 

For the complete list of changes, consult the Go 1.2 Release Notes.

Rate this Article

Adoption
Style

BT