I ran across an old Stackoverflow question from many years ago where someone asked a question about types and wondered if generics could solve it. There was a very high-minded, lengthy reply that Go does not have generics, because that makes the language small and clean.
Since then, Go has implemented generics. Because who the hell wants a strongly typed language without generics on this side of 2010?
I honestly only think generics made it into Go because the designers started getting embarrassed by the solution to nearly every problem being “create an empty interface”.
On this side of 1990. I’m not saying C++ did this right, but it embraced the idea that maybe the compiler could do a little more for us. And every time someone fielded a new language with some traction, eventually they added generics or just used duck-typing from the start.
I ran across an old Stackoverflow question from many years ago where someone asked a question about types and wondered if generics could solve it. There was a very high-minded, lengthy reply that Go does not have generics, because that makes the language small and clean.
Since then, Go has implemented generics. Because who the hell wants a strongly typed language without generics on this side of 2010?
I honestly only think generics made it into Go because the designers started getting embarrassed by the solution to nearly every problem being “create an empty interface”.
On this side of 1990. I’m not saying C++ did this right, but it embraced the idea that maybe the compiler could do a little more for us. And every time someone fielded a new language with some traction, eventually they added generics or just used duck-typing from the start.