Were you unable to attend Transform 2022? Check out all of the summit sessions in our on-demand library now! Watch here.
This is not a major release, as denoted by the version number and the fact that the only language change is the lifting of a restriction in the map literal syntax to make them more consistent with slice literals. That said, Go 1.5 does include a significant rewrite: The compiler tool chain has been translated from C to Go. This means “the last vestiges of C code” have been finally removed from the Go code base.
As for actual changes in Go 1.5, you’ll want to read the full release notes. Highlights include improvements to garbage collection, the developer tools, the standard library, and new ports.
First up, the garbage collector has been completely redesigned, with Google promising “a dramatic reduction in garbage collection pause times.” The scheduler was improved so that the number of concurrently executing goroutines (default GOMAXPROCS value) can be changed from 1 to the number of available CPUs, and the linker can now distribute Go packages as shared libraries to link into Go programs.
The developer tools now support “internal” packages, so you can share implementation details between packages, and there is now experimental support for “vendoring” external dependencies, a step toward a standard mechanism for managing dependencies in Go programs. The new “go tool trace” command lets you visualize program traces generated by new tracing infrastructure in the runtime, while the new “go doc” command substitutes the original “godoc” with an improved command-line interface.
In the standard library, the flag package now shows cleaner usage messages, the math/big package now provides a Float type for computing with arbitrary-precision floating point numbers, the reflect package provides the new ArrayOf and FuncOf functions (analogous to the existing SliceOf function), and the DNS resolver on Linux and BSD systems no longer has the cgo requirement for programs that do name lookups. Lastly, the go/types package has been moved to the standard library from the golang.org/x/tools repository.
New operating system and architecture ports include darwin/arm, darwin/arm64 (Apple’s iPhone and iPad devices), and linux/arm64. Experimental support for ppc64 and ppc64le (IBM PowerPC 64-bit, big and little endian) are also available.
To be clear, the Go mobile project, an experiment to see how Go might be used for building apps on Android and iOS devices, is not part of this release. That said, the darwin/arm64 port and external linking features are there to support the Go mobile project.
VentureBeat's mission is to be a digital town square for technical decision-makers to gain knowledge about transformative enterprise technology and transact. Discover our Briefings.