Why doesn't this compile?

        const int map[dstring];
        static this() {
                map["abc"] = 123;
        }

It seems utterly pointless to be able to declare a const associative
array yet be unable to initialize it (trying to initialize it with an AA
literal doesn't work, the compiler complains the literal is
non-constant).

AA's are a very welcome inclusion in D (IMNSHO, no modern programming
language worth its salt should omit AA's), but they do have some aspects
that are utterly annoying.


T

-- 
Food and laptops don't mix.

Reply via email to