Go Programming Language Gets Type Aliases

The Go programming language is out in version 1.9, which features type aliases among many other new features and changes.

Often called Golang because of its generic name, Go was identified (along with Scala) as the programming language most likely to pay off with high salaries for its practitioners, based on data from a huge developer survey from Stack Overflow.

It's an open source, cross-platform language originally developed by Google about seven years ago. It's compiled, concurrent, imperative and structured, used for a variety of tasks including Web development, block-chain, system or back-end programming and cloud infrastructure, among many others.

"There are many changes to the language, standard library, runtime, and tooling," in Go 1.9, said Francesc Campoy in an announcement post yesterday. "Most of the engineering effort put into this release went to improvements of the runtime and tooling, which makes for a less exciting announcement, but nonetheless a great release."

One feature Campoy did single out in the new release is type aliases:

The most important change to the language is the introduction of type aliases: a feature created to support gradual code repair. A type alias declaration has the form:

type T1 = T2

This declaration introduces an alias name T1 for the type T2, in the same way that byte has always been an alias for uint8. The type alias design document and an article on refactoring cover this addition in more detail.

Campoy also detailed improvements to the math/bits, sync, testing, and time packages, along with pointing out that a change made to compile package functions concurrently speeds up the Go compiler.

Full details can be found in the release notes, which, along with type aliases, places "defining when implementations may fuse floating point operations" as a major change to the new release.

About the Author

David Ramel is an editor and writer for Converge360.