Single assignment C
sac-home.org
sac-home.org
What really annoyed me about array languages is that idiomatic code is nearly impossible to follow after a month, so I ended up aliasing many of the commands to more verbose alternatives and using longer traditional constructs like IF-THEN-ELSE.
That pretty much turned the language into weird-C-limited-to-binary-functions-with-an-array-stdlib, which kind of defeated the point.
[1] http://www.jsoftware.com/
[2] https://github.com/ngn/aplI've not made any speed comparisons, but maybe you can give APL, J, Julia and SAC a bench? That would be neat! A simple hello world like example, for example using the same FFT algorithm, or "addition" loop would be enough.
If you (or anyone else) is interested, drop me an email (see HN profile) and I can get you in contact with them as most of the people involved are either current or old colleagues of mine.
int x[100][83];
Sure looks like a 2D array of ints for all intents and purposes. int x_1d[8300];
Where x[a][b] is x_1d[a + 83*b];An array of arrays is contiguous in memory. There are no pointers involved until you take the (r)value of the array or one of the inner arrays, at which point it is degraded to be a pointer to the array's first element, as always.
Since we have the declaration, it's unambiguously the 2D array that you described.
EDIT: I might be seeing things, but I think you have your order mixed up, x[a][b] is not x_1d[a + 83b], but rather x_1d[a83+b]