News for hackers. Stuff that matters.
Re:Down the Golang Nil Rabbit Hole by somezero on Tuesday March 30, 2021 @02:22AM (#26631686)
How much do your colleagues (ab)use goto statements that Go provides? :)
Re:Down the Golang Nil Rabbit Hole by tirrex on Tuesday March 30, 2021 @03:04AM (#26631889)
C++ has goto, Java has “break <label>“, nobody uses it but you see a lot of generics abuse.
Re:Down the Golang Nil Rabbit Hole by calessian on Tuesday March 30, 2021 @06:45PM (#26641475)
I’ve seen break label a handful of times for nested loops. Whether that was the best choice is of course always up for debate. It’s definitively possible to replace and not a necessary language feature.

Maybe it’s a good thing it’s not widely known, generics are trivial to discover.

Re:Down the Golang Nil Rabbit Hole by saturn_vk on Tuesday March 30, 2021 @06:37AM (#26633017)
What can be classified as generics abuse in Java?
Re:Down the Golang Nil Rabbit Hole by BobbyJo on Tuesday March 30, 2021 @11:53AM (#26636122)
Using generics anywhere only a single type is ever used. The ambiguity really just hurts readability and creates a landmine for future engineers that think other types can be used willy-nilly and things will behave as they should. Especially if some optimizations get done underneath that assume or asserts some set of types, but doesn't enforce them at the API level.
Re:Down the Golang Nil Rabbit Hole by masklinn on Tuesday March 30, 2021 @09:05AM (#26634110)
Using java is abusive towards generics, they didn't deserve that?
Re:Down the Golang Nil Rabbit Hole by BobbyJo on Tuesday March 30, 2021 @11:35AM (#26635833)
I've literally never seen them. Not even once.