On Wednesday, 27 January 2021 at 15:12:32 UTC, Paul Backus wrote:

Maybe it's to avoid invalidating the result of `key in aa` when adding or removing entries? The spec doesn't say anything about it either way [1], but allowing invalidation would make AAs much more difficult to use in @safe code.

[1] https://dlang.org/spec/hash-map.html

Correction: the GC would take care of the safety issue, of course. I haven't had my morning tea yet, and clearly I'm not thinking straight. :)

Reply via email to