▲ 4 ▼ The Go 1.18 generics landscape
A fairly complete presentation about Go 1.18 generics including examples, planned changes for future releases, writing generics code, defining constraints, new library packages, and generics examples for generics Map() / Reduce() / Filter() and a type-safe Set implementation.
Register to comment or vote on this story
A small copy-paste typo can be found at end of slide §6.1 Generic Keys and Values functions from x/exp/maps.
Values was mistyped Keys:
for i := 0; i < 5; i++ {
fmt.Printf("Values: %#v\n", Values(m))
}
Good catch ! Fixed, thank you.