3 ms·
I was writing code in go for maybe a week before I noticed "make" was an overloaded function and subsequently noticing go doesn't allow you to overload your own
by toolz 6y ago
I was writing code in go for maybe a week before I noticed "make" was an overloaded function and subsequently noticing go doesn't allow you to overload your own functions.
Things as simple as this seem mundane, but it's painfully obvious discrepancies like this that make me avoid go when I can - if I'm going to utilize a new language, I'd prefer it to have interesting and consistent paradigms that lead developers to a similar understanding of how to use the language. Inconsistency in the core language like this doesn't give me a lot of hope for the longevity of go projects remaining easy to reason about.
- DangitBobby 6y agoTo me, the fact that there are concepts such as generic containers (slices, maps) but that you aren't allowed to design your own is a concession that generics are useful, necessary, and not too complicated for the language. It confuses me that people then defend the decision to exclude other forms of generics. I was very interested in learning and applying the language at one point, but the inability to make very basic abstractions and the horrific proliferation of either manual or generated boilerplate code made me decide to shelve it permanently, or at least until go 2.0 comes out with generics.