New array declaration syntax

Well, there’s also “The problem is that the type is split into matrix[I,J] and [N].”

Did you look at the tuples proposal? That That proposes adding declarations like

(int, real, vector[4]) tup;
tup.1 = 2;
tup.2 = 20.34;
tup.3 = [1,2,3,5]';

What if you need to put an array in a tuple? Is it

(real[3], vector[1]) tup;
tup.1 = {1.1, 2.3, 4.0};
tup.2 = [1]';

and if that’s acceptable then can you also write

real[3] r;
r = {1.1, 2.3, 4.0};

So here we are.

Not a ton but we see them once in a while. Here’s the latest example, from a week ago.

I agree, this is a problem. The tuples and structs design doc even says it’s a hasty copy&paste, “no need to review yet” and yet people seem to think it’s all agreed on and close to being implemented?

3 Likes