Nicholas Smith:

Can anyone explain reasoning behind this?

To help confuse you a little more, this syntax is also allowed in D:

int array[2][3];

Plus of course a mixed D/C (http://d.puremagic.com/issues/show_bug.cgi?id=5807 ):

int[2] array[3];

Mixing fixed size arrays with dynamic ones is interesting:

auto array1 = new int[3][](2);
auto array2 = new int[][3][](2);

D array definition syntax is one of the cases where I think the Ada/ObjectPascal syntax is better.

Bye,
bearophile

Reply via email to