Go generics are not bad

lemire.me
go-generics-are-not-bad

When programming, we often need to write ‘generic’ functions where the exact data type is not important. For example, you might want to write a simple function that sums up numbers. Go lacked this notion until recently, but it was … Read more

When to Use Generics

go.dev

Ian Lance Taylor12 April 2022 Introduction This is the blog post version of my talks at Google Open Source Live: [embedded content] and GopherCon 2021: [embedded content] The Go 1.18 release adds a major new language feature: support for generic … Read more

Generics can make your Go code slower

planetscale.com
generics-can-make-your-go-code-slower

Go 1.18 is here, and with it, the first release of the long-awaited implementation of Generics is finally ready for production usage. Generics are a frequently requested feature that has been highly contentious throughout the Go community. On the one … Read more

How generics are implemented in Go 1.18

github.com
how-generics-are-implemented-in-go-1.18

This document describes the implementation of generics via dictionaries and gcshape stenciling in Go 1.18. It provides more concrete and up-to-date information than described in the Gcshape design document The compiler implementation of generics (after typechecking) focuses mainly on creating … Read more

Go Generics Facilitators

rakyll.org

Mon, Dec 20, 2021 Go 1.18 is going to be released with generics support. Adding generics to Go was a multi-year effort and was a difficult one. Go type system is not a traditional type system and it was not … Read more