Currently in D if you define an array with enum index you get an associative array, that is wasteful in both memory and performance for most enums that have contiguous values (but I think maybe D implementations will be free to use a more efficient array here, because the interface of AAs is opaque).

And there is this small problem too:
http://d.puremagic.com/issues/show_bug.cgi?id=6974

------------------------

Kagamin:

I was surprised a little when compiler rejected `ref in`.

But this compiles:

alias int[1_000] TA;
void foo(const ref TA a) {}
void main() {}

Bye,
bearophile

Reply via email to