Michał Górny (he/they) ∞🙀🚂🐧 on Nostr: What people seem to have trouble understanding about undefined behavior is that it's ...
What people seem to have trouble understanding about undefined behavior is that it's undefined. As in, not defined. Literally anything can happen, and there's no guarantee that the same thing will happen the next time.
You aren't supposed to rely on any behavior. No, it doesn't matter that this behavior makes sense. No, it doesn't matter that you can't imagine how anyone would actually implement it any other way. No, it doesn't matter that you think you've covered all the possible implementations. No, it doesn't matter that you've tested and verified all the historical implementations, and travelled into the future to test a few future implementations as well.
You just aren't supposed to rely on undefined behavior.
#programming #C #Gentoo #Python
You aren't supposed to rely on any behavior. No, it doesn't matter that this behavior makes sense. No, it doesn't matter that you can't imagine how anyone would actually implement it any other way. No, it doesn't matter that you think you've covered all the possible implementations. No, it doesn't matter that you've tested and verified all the historical implementations, and travelled into the future to test a few future implementations as well.
You just aren't supposed to rely on undefined behavior.
#programming #C #Gentoo #Python