Re:Go 1.17 Release Candidate 1
by nine_k on Tuesday July 13, 2021 @05:41PM
(#27826646)
Introduction of generics would need a major version number change. It would involve not just a complier rework, but also a large stdlib rework.
[ Parent
| on HN ]
That is not true, generics are and have been planned for 1.18.
They'll be introduced in a backwards compatible way.
https://golang.org/doc/go1compat
Generally, adding features does not break backwards compatibility. Note that ioutil was depreciated while it is unlikely to ever be removed
"The io/ioutil package has turned out to be a poorly defined and hard to understand collection of things. All functionality provided by the package has been moved to other packages. The io/ioutil package remains and will continue to work as before, but we encourage new code to use the new definitions in the io and os packages."
It will never be removed, thankfully.
Even if the new stdlib is 100% backwards compatible (which I think is the goal), it still needs rework to make it use generics where appropriate.
why does the stdlib need to adopt generics? That would break the Go1 promise. They would likely introduce new functions rather than changing existing ones. RE: what they did with the ioutil package