Comment

Comment by arihant

Russ Cox said this year that generics aren't left out because of political reasons or design choice. They are left out because of technical constraints which are:

- Generics in current form won't work across the board with all parts of Go.

- Generics of form that will work for Go across the board are not technically trivial.

Honestly, I appreciate Go's philosophy of not implementing until fully understood and accepted. Besides, Go's primary design principle is that of composability. So you're using reflection in one form or another. Achieving generic behaviour with interface and reflection is much more consistent than generics as we know from other languages.

parent arihant 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton