News for hackers. Stuff that matters.
Re:The Next Step for Generics by mrmonkeyman on Tuesday June 16, 2020 @04:57PM (#23544013)
Same here. Go tends to make me "just do it". I personally think it's a big win, because I believe systems need to be composed and the components they are composed of as simple as possible. As a human though I tend to waste time coming up with fancy abstractions. Generics are exactly that. Fancy, nice to have, but I completely fail to see how they are necessary.
Re:The Next Step for Generics by entha_saava on Tuesday June 16, 2020 @11:42PM (#23547499)
Maybe you think go is simple. But I don't.

You need a for loop for what is done in other languages with one method call.

Removing an element from an array doesn't look like that. It is some slice appending trickery.

Having null and having to check errors every 5th line or so..

It lacks idioms like list comprehensions or map / filter. Reading code is spent in details like whether a for loop is index(), count(), map() or filter().

Instead of some simple code like x = condition ? a : b you are writing imperative verbose code like: if condition { x = a } else { x = b }

Go maybe simpler than enterprise-style java. But that's not 'simple'.

http://archive.is/YPxJP

Re:The Next Step for Generics by platinumrad on Tuesday June 16, 2020 @05:02PM (#23544072)
I mostly disagree with this post, but vouched for it because there is absolutely no reason for it to be dead.
Re:The Next Step for Generics by totalperspectiv on Tuesday June 16, 2020 @05:11PM (#23544178)
Is there an old quote about `as simple as possible but no simpler`? Go rides the simple line really well occasionally, but generics is an area where it falls into the 'simpler' category.