Open bobjervis opened 9 years ago
The issue of shape conformance is a non-trivial one. As long as elements can be put into correspondence between shaped collections, then there could be rules to auto re-shape vectors that are not the exact same length. IN effect, by allowing scalar values to confront vectors around operators, the conversion from scalar to vector is a form on conformance.
Allow all relevant scalar operators to extend to vector operands yielding vector results.
For example:
int[] a, b, c;
a = b + c;
This should do an element-by-element equivalent:
a[i] = b[i] + c[i]; // for all i in the arrays.
The b and c arrays must be conformant. Since the only supported arrays are single-dimensional this means effectively that b and c must have the same length.