Go 1.13 Modernizes Number Literals |
Written by Kay Ewbank |
Thursday, 05 September 2019 |
The latest six-monthly update to Go has been released with a more uniform and modernized set of number literal prefixes. Go is an open source project developed by a team at Google and many contributors from the open source community over more than 8 years. The main intended use is as a systems programming language, and it has been used in high profile commercial successes such as Docker.
Alongside Go 1.13, the Go development team has also announced the availability of a number of services run by Google, including a module mirror for accelerating Go module downloads, an index for discovering new modules, and a global go.sum database for authenticating module content. The thinking behind the change to the number literal prefixes comes from the fact that while the Go development team adopted C’s number literal syntax when it was initially designed, it hasn't kept up with the changes to the 'C-numbered languages'. Other languages such as C, C++, C#, Java, JavaScript, PHP and Python have extended their number literals to add some or all of binary, octal and hexadecimal integer literals. Go has now added all these, which the development team says should make it easier for developers to move between Go and the other C-numbered languages. Go programmers can now specify literals using the following prefixes:
The language changes were implemented by changes to the compiler, and corresponding internal changes to the library packages. More InformationRelated ArticlesGo Rejects The Syntactic Sugar Of Try Go Survey Shows Show Continuing Preference For Go Go 1.10 Adds Automatic Caching A Programmer's Guide To Go With Visual Studio Code
To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |
Last Updated ( Thursday, 05 September 2019 ) |