Empty associative array

deadalnix deadalnix at gmail.com
Mon Aug 9 13:36:20 UTC 2021


On Monday, 9 August 2021 at 13:10:53 UTC, Dukc wrote:
> ...however, if you initialize `a` with `emptyAA.dup` it will 
> again be `null`!
>
> I believe we can only conclude that empty AA's are not supposed 
> to rely on being non-`null`. Sorry Walter - in my eyes this is 
> a design failure.

I don't think this is a much of a problem, after all, .dup is 
meant to create a new identity, and you can't really rely on that 
identity being anything specific.

That being said, yes, there is clearly some level of snafu 
involved in that design.


More information about the Digitalmars-d mailing list