Go Generics 101

By Liu Xu

Go Generics 101 - Liu Xu
  • Release Date: 2022-04-06
  • Genre: Programming

Description

Starting from version 1.18 (the current latest version), Go supports custom generics. This book talks about the custom generics feature of Go programming language. The content in this book includes: * custom generic syntax * type constraints and type parameters * type arguments and type inference * how to write valid custom generic code * current implementation/design restrictions A reader needs to be familiar with Go general programming to read this book. In particular, readers of this book should be familiar with Go type system, including Go built-in generics, which and Go custom generics are two different systems. Currently, the book mainly focuses on the syntax of, and concepts in, custom generics. More practical examples will be provided when I get more experiences of using custom generics.