Do more work to prevent iterator invalidation for Dict's? #11316
Labels
design
Design of APIs or of the language itself
kind:speculative
Whether the change will be implemented is speculative
Should we try to do more to prevent iterator invalidation for Dict's (and possibly for other types as well)?
Contrast this Julia code:
with this Python code:
I would argue that Python's error is more helpful for debugging, although producing such an error requires making the iteration protocol do more run-time checking on every iteration to see whether the iterator has been invalidated.
Was this a conscious decision already made for the language? Skipping these kinds of checks does feel like the Julian way, but I wanted to confirm that this was intended behavior.
The text was updated successfully, but these errors were encountered: