Go generics: Baby steps

1 · Matouš Dzivjak · April 3, 2022, midnight
Generics have come to Go. One of the most radical changes to Go in years that sparkled a lot of heated discussions and took the frontpage of HN many times. The time has finally come to give it a try. Generics Go is a typed language, meaning that every value, variable, and function has a specific type (such as int or func (string) error). Until go 1.18 the only way to get around the type restrictions was to either use interface or generate typed code before compiling the binary....