3 ms·
Has something changed such that adding an exported field to a struct is now safe in the case of clients who are using struct embedding? Previously: https://blog
by anonymoushn 6y ago
Has something changed such that adding an exported field to a struct is now safe in the case of clients who are using struct embedding? Previously: https://blog.merovius.de/2015/07/29/backwards-compatibility-in-go.html https://blog.merovius.de/2015/07/29/backwards-compatibility-...
- jbamsterdam 6y agoNothing's changed, and that's still an issue. We didn't address it because the post was long enough, but as Merovius himself says, it's called out in the Go 1 compatibility promise. So the Go standard library doesn't worry about it, and neither should you. It's also extremely rare; I've never seen it in 10 years of Go programming.