4 ms·
Haha, touche. Your response is fair. My point was only that some people act like any successful language must have generics, which is demonstrably false IMO. I
by gautamcgoel 6y ago
Haha, touche. Your response is fair. My point was only that some people act like any successful language must have generics, which is demonstrably false IMO. I am not opposed to innovation and ergonomics (hence, my support for arbitrary precision ints), but we should carefully weigh the pros and cons of every new proposal, especially if it increases the complexity of the language and toolchain. In my opinion, the benefits of generics are outweighed by the cost of their complexity.
- CarelessExpert 6y agoFirst: I ninja-edited my comment after the fact with a thought that occurred to me after I posted, so apologies there. Anyway, yeah, no argument there at all. I'll be honest, as an outsider that's somewhat familiar with Pike's obsession with simplicity in Go, I'm actually a bit surprised this is getting in. It does seem like the kind of high-complexity feature that was deliberately excluded from the language as part of its overall design ethos. But it really comes down to a weighing of pros and cons. Generics have the potential (though definitely not the guarantee!) to trade off developer complexity for compiler and toolchain complexity, and the preference on that choice is a personal one.
- loopz 6y agoWell, then you also know he just didn't see any good implementations of generics, yet. Let's hope this gets good!
- cies 6y agoWell, we know now, contrary to what was said about generic-and-Go when Go came out: Go can apparently not do without generics. What I always found hard to swallow is that Go's build in functions sometimes did have generics. Just you as a library/application writer were not allowed to create APIs with generics yourself.
- Cyph0n 6y agoYep, seemed weird to me how (a form of) generics existed, but was exclusive to the stdlib/language. If generics were unnecessary, why did the stdlib/language need them? Couldn't they just have lived with, e.g., make_map, make_slice, make_chan, etc?
- piinbinary 6y agoAnd a separate copy of `append` for every possible type :)
- cies 6y agoExactly. It was IMHO pretty authoritarian to say "you dont need generics" and then use it yourself in the standard lib. But then Go is not a public place: it's private domain of Google. I decided long time ago I dont want to learn a private tool without being paid.