Golang 1.13 adds number literal prefixes
Go (Golang) 1.13, the latest version of Google’s open source language, is now available as a production release. The update supports a more uniform and modernized set of number literal prefixes.
Go 1.13 was released on September 3 after beta and release candidate stages spanning from late June through August. Language changes in the release abide by the golang number literal proposal, which extends the language to make it easier for developers to move between Go and other “C-numbered” languages including C, C++, C#, Java, and JavaScript.
Go adopted C’s number literal syntax from the beginning, but while most other C-numbered languages have added binary integer literals, alternate octal integer literals, hexadecimal floating point literals, and support for _ as a digit separator in number literals, Go has not kept up with these extensions—until now.
Language changes in Go 1.13, which arrived about six months after Go 1.12, include:
Language changes were implemented by changes to the compiler and corresponding changes to library packages. Go 1.13 also removes the restriction that a shift count has to be signed, eliminating the need for many artificial uint conversions. The compiler, meanwhile, has a more precise implementation of escape analysis. Also, TLS (Transport Layer Security) 1.3 is enabled in the crypto/tls package by default.
You can download Go 1.13 from golang.org.
This story, "Golang 1.13 adds number literal prefixes" was originally published by InfoWorld.