On Thursday, 31 July 2014 at 02:03:37 UTC, Puming wrote:
1. Are AAs reference type? if so, why does the compiler copy it?
This is probably your problem. They are reference types, but initially that reference is `null`. When you write:
auto cmds = CONFIG.commands;`cmds` contains a copy of the `null` value. On assignment, the actual AA is created, and assigned to `cmds`, but not back to `CONFIG.commands`. Try initializing the AA in your class constructor.