Re:Proposal: Go should have generics
by d4rkph1b3r on Thursday April 14, 2016 @04:52PM
(#11500250)
The whole point of abstractions is that you don't have to worry about as much. Generics take away complexity, that's the whole point.
I suppose it depends on the level of understanding that you want from your code. Generics introduce another dimension which you have to think about when you want a good level of control on allocations for example. Different data types also have different optimizations available which could be missed when blindly relying on the generic algorithm (think sorting on a fixed set for example)
Re:Proposal: Go should have generics
by stcredzero on Thursday April 14, 2016 @05:33PM
(#11500512)
The whole point of abstractions is that you don't have to worry about as much. Generics take away complexity, that's the whole point.
Sure. Abstractions are perfect, and you never have to think about their costs. Generics always take away complexity. Gotcha.
Generics introduce more complexity for the reader of the code because it's another abstraction to understand.
It's debatable but when your brain is thinking about generics or context-switching because it has to wait on the compiler to finish, it's less time making progress on the actual thing that needs to be done.