Go 1.24 Adds Generic Type Alias Support |
Monday, 17 February 2025 | |||
Go 1.24 has been released. This version adds support for generic type aliases, and is also faster. Since its initial development by Google, Go has matured as an open source project maintained by a team at Google with input from many contributors from the open source community. Go was designed as a systems programming language, and has also been used in high profile commercial successes such as Docker. The new version comes with support for generic type aliases. A type alias may be parameterized like a defined type, and provides a way around the previous restriction that while a type alias may refer to a generic type, the type alias couldn't have its own parameters. This restriction was imposed because it is unclear how to handle a type alias with type parameters that have constraints. Several performance improvements in the runtime have decreased CPU overhead by an average of two to three percent. One way this has been achieves is through a new built-in map implementation based on Swiss Tables. Swiss Tables is a family of hash tables from Google's open-source C++ library Abseil that were developed as a faster, smaller replacement for the std::unordered_map from the C++ standard library. Other ways the performance has been improved include more efficient memory allocation of small objects, and a new runtime-internal mutex implementation. This release also has some tool improvements, including a Go 1.24 is available for download now. More InformationRelated ArticlesGo 1.18 Released With Generics And Fuzzing Insights Into Where Go Is Going A Programmer's Guide To Go Part 2 - Objects And Interfaces A Programmer's Guide To Go Part 3 - Goroutines And Concurrency 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 |