3 ms·
> What even is a 'backwards compatible bug fix'? Unless it's performance, isn't a bug-fix by definition not going to be backwards compatible? It's a fix that m
by jjav 4y ago
> What even is a 'backwards compatible bug fix'? Unless it's performance, isn't a bug-fix by definition not going to be backwards compatible?
It's a fix that makes the code work as documented, which it didn't do before, ergo had a bug.
To pick a random example, the man page for strlen on Linux reads:
"The strlen() function calculates the length of the string s, excluding the terminating null byte ('\0')."
If it behaves differently (let's say it counts the terminating null) then strlen has a bug. The fix to that can go into a patch release because it simply fixes the interface to work as documented.
You could go down a rathole of saying well maybe someone depends on the broken functionality. Sure, but that's not what the documented contract was. The documented functionality is the contract the API needs to meet.
- chrisseaton 4y agoThat's too-specific an example. Often the bug is a corner case which wasn't considered, so that the documentation didn't say what was happening, and people were implying on the old relying behaviour.