Marco Leise:

but

int[100][3] a2 = [1, 2, 3];

would likely have summoned a controversy about array
initializers with some people finding it reasonable to
do this.

This code compiles:

void main() {
    int[100][3] a2 = [1, 2, 3];
}

And gives at run-time:

object.Error: lengths don't match for array copy, 300 = 3


That creates an inconsistency:

// ok, to initialize array of ten with single literal
int[10] a1 = 1;
// not ok, to initialize array of ten with single literal ?
int[10][3] = [1, 2, 3];

Currently that second line of code doesn't work.

Bye,
bearophile

Reply via email to