On 8/7/14, 10:35 AM, Puming wrote:
On Thursday, 7 August 2014 at 16:53:24 UTC, H. S. Teoh via Digitalmars-d
It's really just the .init value of null which causes odd behaviour with
empty AA's. Fun fact:
void changeAA(int[string] aa) {
aa["a"] = 123;
}
// Null AA:
int[string] aa1; // null
assert(aa1.length == 0);
changeAA(aa1); // no effect
for most of the new users the WAT part is actually here :-)
One function we could and should use is one that makes an AA that is
empty but not null. Right now one needs to use goofy methods such as
adding and then removing a key. -- Andrei