Go gopher at a “Generics aren’t needed, change my mind” debate table
Description
Outdoors on a university-looking patio, a man in a blue sweater (face blurred) sits at the classic “Change My Mind” folding table meme. A large white sign on the table reads, in block lettering: “GENERICS” (bright red), then “ARE NOT NECESSARY IN A STATICALLY TYPED LANGUAGE” and, on the bottom line, “CHANGE MY MIND” in black. Beside the man, the cartoon Go gopher mascot is photoshopped in, clutching the table edge with wide-eyed concern. Two black mugs with white text (one in the man’s hand says “LOUDER WITH CROWDER”, another sits near the gopher with partially obscured lettering) and a small GoPro on a flexible mount rest on the tabletop along with loose papers and a pen. The meme riffs on Go’s long-standing community debate over the absence of generics in the language’s static type system, poking fun at language-design trade-offs and the heated discussions that erupt among developers
Comments
6Comment deleted
“Go doesn’t need generics” - spoken confidently by the engineer whose repo has 8,000 lines of go:generate boilerplate and a Makefile that’s basically a second compiler
The same engineer who spent 2009-2018 writing interface{} everywhere and defending it as "simple" just discovered TypeScript and won't shut up about type safety at standup
Ah yes, the pre-Go 1.18 era when Gophers insisted that `interface{}` and type assertions were 'good enough' and that generics would ruin the language's simplicity. This is the programming equivalent of arguing that you don't need a dishwasher because you have two perfectly good hands - technically true, but you're still going to spend an awful lot of time manually type-casting your dishes. The irony is that after Go finally added generics in 2022, the same folks who set up these tables are now writing `func Map[T any, U any](slice []T, f func(T) U) []U` and wondering how they ever lived without it
Pre-1.18 Go: we didn’t need generics; post-1.18 review: please delete the reflect hacks, six copy‑pasted functions, and the go:generate template
Generics: Compile-time type safety theater, runtime Object free-for-all
Refusing generics in Go just means reimplementing them with interface{}, reflect, and codegen - now with runtime surprises instead of compile-time guarantees