Does associative array change the location of values?

Stanislav Blinov stanislav.blinov at
Sat Oct 30 14:51:16 UTC 2021

On Saturday, 30 October 2021 at 11:59:15 UTC, Steven 
Schveighoffer wrote:

> It should be documented. There isn't a valid way to remove 
> these requirements, even if they are currently just an 
> implementation detail -- code already depends on these 
> properties.

> And D is a GC-based language, especially when using AAs. There 
> is no reason to introduce undefined behavior for existing usage.

You won't introduce UB by deallocating unreferenced elements, 
which a given GC *may* be able to figure out. Therefore I object 
to "AAs do not deallocate the key/value pairs ever" part. 
Strongly :) Until such time that such a requirement is indeed set 
in stone, and not incidental.

More information about the Digitalmars-d-learn mailing list