Hacker News new | ask | show | jobs
by axaxs 3111 days ago
I'm on the fence about generics...but to answer your question generally...it's not all 'enhancements', it's making a language less readable. Sure, I can choose never to use it. But now I have (more) trouble reading others code. Go's strength, to me, is readability.
1 comments

People programming in Go today already have workarounds to provide the functionality of generics, but at the cost of type safety and speed.

It is very common (especially in libraries) to pass `interface{}` around and use reflection to do manual type checking and type casting.

With generics the code that uses `interface{}` today would actually be much more readable, because the intention of the author would be clear.