Suggestion for language change: Go should get generics

Source: Heise.de added 14th Jan 2021

The programming language Go, originally developed for Google, is one of the few statically typed languages ​​in recent years that does not have support for generic data types. The implementation of parameterized types has been discussed for years – actually since the release of Go on 10. November 2009. Now a proposal has been submitted to change the language, which is supposed to extend Go to include support for type parameters for types and functions and thus enable a form of generic programming.

Support for generic data types Generic data types should offer developers the opportunity to share code and create programs more easily. Generic programming allows you to write functions and data structures for which some types have to be specified later.

With this a function can be written that operates on a slice of any data type. The actual data type is only specified when the function is called. Furthermore, a data structure can be defined that stores values ​​of any type, whereby the type actually to be stored is only specified when an instance of the data structure is created.

Not the first attempt In the past few years there have been several attempts to add generics to Go. After a lot of feedback from the Go community, Ian Lance Taylor, author of the Go frontend for GCC, together with Robert Griesemer, the Swiss developer involved in the development of the Go programming language, decided to submit a proposal for the implementation of the new language feature .

If the proposal meets with approval, the parties involved aim to have a full implementation ready for testing by the end of the year – possibly as part of the beta for Go 1. 18. More information about the proposal can be found in the post on the official Go blog and on GitHub.

(mdo)

Read the full article at Heise.de

brands: A Data  AIM  CODE  First  Generic  Google  New  One  ShieldCase  
media: Heise.de  
keywords: Galaxy  Google  Samsung  

Related posts


Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Related Products



Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91