Fake global associative array literals

bearophile bearophileHUGS at lycos.com
Fri Oct 28 07:53:45 PDT 2011


What do you think about a rewrite rule that changes code like:

int[int] aa = [1:2, 3:4];
void main() {}


Into:

int[int] aa;
static this() {
    aa = [1:2, 3:4];
}
void main() {}

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list