Re:Golang: How to Update APIs for Generics
by pjmlp on Thursday September 16, 2021 @06:09AM
(#28549866)
For the time we have waited already, what is a couple of years more, right?
Now if that would have been part of Go 1.0....
Re:Golang: How to Update APIs for Generics
by can3p on Thursday September 16, 2021 @07:21AM
(#28550315)
So far I prefer this approach to any other. I know this type of discussion happens under any go submission, but still - need in generics is overrated, there a ton of code written for all sorts and purposes and scales and it works just fine. And all that without a gigantic marketing push which means that developers simply like it that way it is.
Go is about compatibility, being able to control your code base and being confident about results and I'd really prefer them to take their time thinking through a non-critical feature rather then rushing it and exploring all sorts of unexpected side effects down the road.
Re:Golang: How to Update APIs for Generics
by pjmlp on Thursday September 16, 2021 @07:23AM
(#28550336)
Indeed, only Google paychecks, and two historical figures of UNIX and Plan 9 history, no marketing at all.
Re:Golang: How to Update APIs for Generics
by grumpyprole on Thursday September 16, 2021 @08:12AM
(#28550722)
"Generics" or parametric polymorphism, first appeared in the 70's. So I don't think including this with Go 1.0 would have been rushing!
Re:Golang: How to Update APIs for Generics
by arghwhat on Thursday September 16, 2021 @10:34AM
(#28552350)
Yeah, about that: just because the theory exists doesn't make it less work to design new elegant typesystems around them.
Go actively decided against generics in the beginning to make a small and simple language. We will lose that now.
Re:Golang: How to Update APIs for Generics
by grumpyprole on Thursday September 16, 2021 @11:19AM
(#28552936)
As they will need to be retrofitted just like Java had to do, yes I'm sure there'll be warts. Had they been considered from the start, I'm sure it could have been much simpler.
Does this mean Go is perfect? Not at all.
It just means I'd rather have generics late than fundamentally broken.