On Friday, 19 July 2024 at 17:20:22 UTC, matheus wrote:
couldn't this case for example be caught during the compiling time?

The RangeError is only thrown when at runtime, the key doesn't exist, so that can't be caught. The real problem is implicit slicing of static arrays, which I'm not a fan of, but removing it is a breaking change. So perhaps Associative Arrays should be enhanced to create keys on slice assignment.

Reply via email to