News for hackers. Stuff that matters.
Re:Generics enabled by default in Go tip by theshrike79 on Saturday August 21, 2021 @01:09AM (#28254385)
If people would stick to common generic data structures (like a map/list that can handle any datatype), i'd be fine with abstractions.

But some people have a tendency to play code golf with their codebases.

I have, for example, encountered a "generic data structure" that looked like a normal linked list on the surface. BUT, it actually sorted the largest three items in the first 3 cells and the average in the 4th.

That was multiple days of work wasted because someone decided to be cute with their data structures. And that wasn't even the only one of such "generic" monstrosities in the code.

Re:Generics enabled by default in Go tip by bmn__ on Saturday August 21, 2021 @02:13AM (#28254672)
So blame goes to the hammer instead of the carpenter?
Re:Generics enabled by default in Go tip by carnitine on Saturday August 21, 2021 @08:25AM (#28256412)
What does that have to do with generics? Surely they’d have written the same bad code monomorphised?
Re:Generics enabled by default in Go tip by h4x0r12345 on Saturday August 21, 2021 @01:47AM (#28254551)
Generics (and other abstractions) are not the root cause. Go was a pragmatic defence against mediocre developers. The majority of developers are mediocre by definition, and will abuse _any_ abstractions to create Rube Goldberg contraptions and monstrosities.
Re:Generics enabled by default in Go tip by pjmlp on Sunday August 22, 2021 @06:09AM (#28264228)
20 years ago those mediocre programmers were using Visual Basic and Java, so look for the past to see where future goes.