3 ms·
It could be my personal negative experience with maintaining code that overuses generics in other languages, but I have reservations about this feature. I almos
by geoka9 5y ago
It could be my personal negative experience with maintaining code that overuses generics in other languages, but I have reservations about this feature. I almost never need them, but on the other hand I don't feel too good about having to repeat myself when writing library packages.
I almost feel I would be happy with generics in Go if Go made them illegal in anything but libraries (not allowed in package main, maybe? Or not allowed in a package unless it gets imported by another package?).
- FpUser 5y agoYes generics / templates are mostly useful for general libraries. But if you afraid of programmers doing stupid things just for the fuck of it it is better not to hire such programmers, warn them if they're juniors or just hit them with the bat on code review.