3 ms·
> Go 1 compatibility keeps us from changing any of the types in the APIs mentioned above. But apparently allows them to change the semantics of those types. I
by twic 10y ago
> Go 1 compatibility keeps us from changing any of the types in the APIs mentioned above.
But apparently allows them to change the semantics of those types. I am somewhat dubious about this. The point of the substantial appendix is to demonstrate that the change in semantics is safe in existing code, but it only looks at a subset of existing code. It's still possible that someone out there has made assumptions which will now be invalid, and their code will be broken by this change.
- kevhito 10y ago> someone out there has made assumptions which will now be invalid I was thinking about this as well, but I think the key is that they guarantee only the semantics that are _documented_. If you make assumptions beyond the documentation, then no, of course they can't guarantee compatibility, otherwise it would essentially forbid any changes whatsoever. Still, it is a good thing the Go team takes the extra step to ensure that even changes that fall inside their compatibility promise are _still_ vetted against a vast body of real-world code, and to check that common (non-documented) assumptions won't be violated if they can help it.