What’s new in Google’s Go language

Version 1.10 offers compiler toolchain and performance improvements but no substantive language changes

The team behind Google’s Go language, aka Golang, has released the release candidate of Go 1.10, the next version of the popular open source language

The new features in Google Go 1.10 beta

The upgrade offers compiler tool chain and performance improvements but no substantive language changes.

Expected to be available in a production version in February 2018, Go 1.10 now provides these key features in its release candidate:

  • Improved performance of code generated by the compiler, spread across supported architectures.
  • Programs should run a bit faster due to speedups in garbage collection, better code generation, and core library optimizations.
  • Dwarf debug information in binaries has been improved, with constant values now recorded. Also, line-number information is more accurate.
  • The linux/ppc64le port now needs external linking with any programs using the cgo command.
  • The go build command detects out-of-date packages based on the content of source files, specified build flags, and metadata in stored packages. Modification times are no longer relevant.
  • The go install command now only installs packages and commands listed on the command line. To force installation of dependencies, developers should use the go install –i flag
  • An update to the grammar for method expressions relaxes the syntax so any type expression is allowed as a receiver, thus matching how compilers already operated.
  • Test results are now cached via go test.
  • The Unicode package has been upgraded from Unicode 9.0 to version 10.0, adding 8,518 characters, including a bitcoin currency symbol and 56 emojis.

Where to download the Go 1.10 beta

You can download the release candidate of Go 1.10 from the Go project site.

The new features in Google Go 1.9

Google released Go 1.9 in August 2017. Here’s what is new and improved:

  • Speedups in the garbage collector, better-generated code, and core library optimizations should make programs run a bit faster.
  • The math/bits package offers optimized implementations to manipulate bits. Functions in this package are treated by the compiler as intrinsics to boost performance.
  • The Go 1.9 compiler supports parallel compilation of functions in a package, leveraging multiple processor cores. Go 1.9 retains the previous versions’ go command’s support for parallel compilation of separate packages. Parallel compilation is on by default but can be disabled. 
  • For scalability, Go 1.9 adds support for type-alias declaration for code repair. A change to the Go language, type aliases support gradual code repair while moving a type between packages. It should aid code repair during large-scale refactoring, moving a type from a package in a way that code referring to an old name interoperates with code referring to the new name. Essentially, the introduction of type aliases  provides a transition period in which the API is available from both new and old packages, making references to old and new versions interoperable.
  • Go 1.9 adds transparent monotonic time support, which makes computing durations between two Time values a safe operation in the presence of wall-clock adjustments.
  • Go 1.9 improves test helper capabilities, with new methods to mark the calling function as a test helper function.
  • A new type in the sync package serves as a concurrent map with amortized-constant-time loads, stores, and deletes. Thus, multiple go routines can call a map’s methods concurrently.

This story, "What’s new in Google’s Go language" was originally published by InfoWorld.