On Thursday, 26 June 2014 at 10:38:54 UTC, bearophile wrot
https://github.com/D-Programming-Language/dmd/pull/3615
Will allow very handy, more DRY and less bug-prone like this:
// static array type
int[$] a1 = [1,2]; // int[2]
auto[$] a2 = [3,4,5]; // int[3]
const[$] a3 = [6,7,8]; // const(int[3])
A comment by Walter:
My reservation on this is I keep thinking there must be a
better way than [$].<
It can share syntax with explicit array operations:
int[*] a1 = [1,2]; // int[2]
int[*] a2 = [3,4]; // int[2]
a1[*] = a2[*]; // copy a2 to a1