3 ms·
> This part of the behavior is left intentionally unspecified so different implementations can add optimizations, and to prevent introducing semantic restrictio
by jnxx 6y ago
> This part of the behavior is left intentionally unspecified so different implementations can add optimizations, and to prevent introducing semantic restrictions that could limit the extensibility of this feature.
Isn't this more or less what was the argument to allow more undefined behaviour in ANSI C ?
(Edit: I think this also comes from the tension caused by integrating features from functional languages into an imperative language, like explained in more detail here: https://news.ycombinator.com/item?id=26086863 https://news.ycombinator.com/item?id=26086863 )
- varjag 6y agoUnlike Python, C has the excuse of runtime efficiency as a plausible rationale. Python is big time SLOW, there's a ton of untapped optimisation potential before wandering into UB for sake of speed territory.
- pfalcon 6y agoThey went for "UB" exactly because they understand the current behavior is not ideal, and to allow for better implementation and to change it later.