What Generics Have in Store for Us
summary
The talk explains Go's new generics feature introduced for Go 1.18: what was decided by the community, how generics are implemented in the language, and what developers will get as a result. It references practical availability in the 1.18 release (February 2022) and invites trying the feature now.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 1:50Static vs dynamic typing
- 4:00Alternatives to generics
- 6:38Python vs Go generics
- 7:22Type parameters in Go
- 9:06Generics in functions and structs
- 9:27Generic constraints
- 12:36Unconstrained generics and 'any'
- 13:19Initializing generic types
- 14:21Generic type parameters
- 15:47Compilation of generics
- 16:48When generics are useful
- 17:32When generics are harmful
- 17:52Benchmarking generics
- 21:06Performance with pointers
- 22:11Generics vs interfaces speed
- 22:54Functional programming with generics
- 23:36Resources and links
- 24:41Q&A
