Empty non-null Associative Arrays should be trivial or even the default.
Rekel
paultjeadriaanse at gmail.com
Tue Aug 3 16:30:24 UTC 2021
On Tuesday, 3 August 2021 at 16:20:50 UTC, Mike Parker wrote:
> You mean, doing something like `aa["foo"]` gives you the range
> violation? That's intended. If the key was never assigned, it's
> just like trying to index a normal array with a value that's
> out of bounds. The proper way to check for an element in an AA
> is via `in`, which returns a pointer to the element if it
> exists and null if it doesn't:
Yes, you are absolutely correct. You've been faster at responding
than I have been at backtracking my previous statements, that is
very impressive 😅, thanks for helping out.
More information about the Digitalmars-d
mailing list