Skip to content

Instantly share code, notes, and snippets.

arendtio / Generics in
Created September 2, 2018 20:52
Generics in Go inspired by Interfaces
View Generics in


For a while, I’ve seen the development around Generics in Go with some weird feeling. On the one hand, I was missing general container types, on the other side, I would not say I like the syntax that comes with generics and templates in other languages.

While writing Go code, I found Interfaces extremely useful, but they are still not nice-to-use for the use-cases you would like to use