News for hackers. Stuff that matters.
Re:Keeping your Go modules compatible by jrockway on Tuesday July 07, 2020 @04:45PM (#23763835)
Modules have nothing to do with comparable structs. It's just that making a comparable struct uncomparable could break users of your API, so it's something to be on the lookout for if you value backcompat. (The module system ensures that users will get the version of the code they want; you only have to worry about backwards compatibility if you expect users to upgrade to your new version.)

There are millions of ways to break users with an update that machines can't detect. For example:

Old version:

func Lt(a, b YourType) bool { return a < b }

New version:

func Lt(a, b YourType) bool { return a >= b }

This is not specific to Go.

There are no comments on this comment yet.