3 ms·
Obligatory: it is flabbergasting that this is a quality of language that is still in active use.
by ajkjk 6y ago
Obligatory: it is flabbergasting that this is a quality of language that is still in active use.
- Gibbon1 6y agoIt's even more flabbergasting that all these problems haven't been fixed.
- layer8 6y agoThat would likely break backward compatibility of existing implementation-defined behavior.
- hyperpape 6y agoConverting sscanf from undefined to implementation defined behavior would, by definition, not break implementation defined behaviors. There are real cases where removing undefined behavior blocks optimizations, but this doesn't feel like one.
- layer8 6y agoImplementations can define behavior for undefined behavior. The difference to implementation-defined behavior is that for the latter implementations MUST define some behavior (from the set of options specified by the standard), whereas for undefined behavior they don’t need to. If an implementation has defined some behavior for sscanf undefined behavior, and then the standard defines a different behavior, then the existing implementation would become nonconforming, and an updated version of the implementation would be not backwards compatible with the existing one. That’s why such changes to the standard can be problematic.
- hctaw 6y agoMost of these things can't be fixed at the language level without seriously breakages or preventing users from doing necessarily dangerous things.