Find Related products on Amazon

Shop on Amazon

Good-bye core types; Hello Go as we know and love it

Published on: 2025-05-29 05:18:14

Goodbye core types - Hello Go as we know and love it! Robert Griesemer 26 March 2025 The Go 1.18 release introduced generics and with that a number of new features, including type parameters, type constraints, and new concepts such as type sets. It also introduced the notion of a core type. While the former provide concrete new functionality, a core type is an abstract construct that was introduced for expediency and to simplify dealing with generic operands (operands whose types are type parameters). In the Go compiler, code that in the past relied on the underlying type of an operand, now instead had to call a function computing the operand’s core type. In the language spec, in many places we just needed to replace “underlying type” with “core type”. What’s not to like? Quite a few things, as it turns out! To understand how we got here, it’s useful to briefly revisit how type parameters and type constraints work. Type parameters and type constraints A type parameter is a placeh ... Read full article.