What's coming in Go 1.18
What's coming in Go 1.18
Posted Feb 8, 2022 23:04 UTC (Tue) by Cyberax (✭ supporter ✭, #52523)Parent article: What's coming in Go 1.18
One other significant addition: "~" operator for constraints. You can now write: "func min[T ~float32 | ~float64 | ~int](x T, y T) T" meaning that T is a type that behaves like float32, float64 or int.
