"in" operator gives a pointer result from a test against an Associative Array?

Andy Valencia dont at spam.me
Fri May 10 18:08:48 UTC 2024


On Friday, 10 May 2024 at 16:33:53 UTC, Nick Treleaven wrote:
> Arrays evaluate to true in boolean conditions if their `.ptr` 
> field is non-null. This is bug-prone and I hope we can remove 
> this in the next edition.
> ...
> A string literal's `.ptr` field is always non-null, because it 
> is null-terminated.

Thank you!

Andy


More information about the Digitalmars-d-learn mailing list