News for hackers. Stuff that matters.
Re:a[low:high:max] in Golang – A Rare Slice Trick by kjksf on Saturday March 18, 2023 @11:13PM (#35215656)
Maybe you shouldn't play game of telephone like that.

Go generics are exceptionally well designed.

The reason it took so long for Go to get generics is because Go designers took their time to arrive at a design that fits with the rest of Go.

It's not rushed, it's not "bolted on".

They did several designs that they rejected before they accepted the design that got implemented.

Re:a[low:high:max] in Golang – A Rare Slice Trick by wyager on Saturday March 18, 2023 @11:59PM (#35215901)
This is a truly unreal level of blub paradox and/or brown nosing. It's almost a complete inversion of reality.

Go's maintainers had to be beaten into bolting on a poorly-done implementation of polymorphism over like a decade. I can't imagine anyone who's used any language with polymorphism baked in to the design describing Go's implementation as "exceptionally well designed". If this is a Poe's law thing and you're just joking, then you got me.

Re:a[low:high:max] in Golang – A Rare Slice Trick by fooster on Sunday March 19, 2023 @01:17AM (#35216273)
If you are going to make such a claim then please back it up rather than state opinions as facts.
Re:a[low:high:max] in Golang – A Rare Slice Trick by the_gipsy on Sunday March 19, 2023 @03:46AM (#35216914)
Re:a[low:high:max] in Golang – A Rare Slice Trick by Groxx on Sunday March 19, 2023 @07:34PM (#35224979)
Yeah. Go generics are quite crippled. I'm still very, very glad that they exist though - even crippled, they're a vast improvement.

I think they took a... rather extremely-conservative step towards what their generics will eventually be, at which point they'll probably be pretty reasonable. As it stands now they're kinda weird and and very incomplete, though thankfully simple (in behavior).

They did at least leave syntactic and semantic room to improve them though, so I think it'll happen eventually. It was cut off at a safe point. They just need to be brow-beaten further.

Re:a[low:high:max] in Golang – A Rare Slice Trick by slimsag on Sunday March 19, 2023 @10:15PM (#35226443)
I'm a big fan of Go, have been using it since r59 (pre 1.0), professionally working with it the past ~8 years at one of the earliest companies to adopt it.

The fact that you cannot have a generic method at all, and instead have to rewrite methods as functions.. that seems like a pretty glaring flaw.

I'm happy Go got some form of generics, definitely, but they really do feel bolted on to the language.