Send empty assoc array to function
666total at wp.pl
Fri Jul 10 11:57:38 UTC 2020
On Friday, 10 July 2020 at 03:59:37 UTC, Mike Parker wrote:
> Meh. You could say the same about foo(int), or
> foo(SomeClass). AAs are reference types. Reference type
> instances can be null.
Oh, that actually makes sense. I always thought assoc arrays are
Anyway, even if they are reference type, I still would consider
 and null different types of values.  conveys to me that the
object exists, but is empty. null conveys to me that the object
exists and cannot be used.
int[int] a = null;
a = 6;
This kind of code just looks weird... yes, I know the " = null "
part is excessive, but still.
More information about the Digitalmars-d-learn