3 ms·
> Adding generics was too much I strongly disagree. Sure, like anything in programming, generics can be misused. But even comments can be misused! OTOH I am a
by dblohm7 2y ago
> Adding generics was too much
I strongly disagree. Sure, like anything in programming, generics can be misused. But even comments can be misused!
OTOH I am able to build things in Go with generics that I would not be very happy building without them.
- nasretdinov 2y agoYeah I agree. Due to Go's slow moving approach we'll see the biggest impact of generics much later, when they become more prominent in the standard library. A lot of those APIs are necessarily not type safe now and generics would close that gap quite nicely
- gary_0 2y agoThe thing people dislike, I think, is that actually implementing generics and handling all the syntactical and compilation edge cases is complicated and ugly. But generics as a high-level concept are wonderfully simple and useful ("let me use different types with certain code constructs without having to manually duplicate them, and stop me from doing anything that doesn't make sense"). It would be a far easier call for languages to add them if they were just a bit of syntactic sugar instead of a whole new section in the manual. (I do think adding generics was a good call; practicality trumps a fussily clean design, in my book.)
- jen20 2y ago> But even comments can be misused! And arguably are in Go, where they are used for all kinds of things that are not inline documentation!
- fuzztester 2y agoexamples of that? code generation? been away from go for a while, after using it some earlier, so not up to date