As a Chapel programmer, I'd like the ability to use Chapel's query syntax to pick the individual ranges out of a multidimensional array. For example, imagine:
D1 would be bound to X's domain (of any number of dimensions or kind), as currently supported
Y would need to be a 2D array whose ranges would be bound to r1 and r2
Z would need to be a 3D array whose ranges would be bound to r3, r4, and r5
Similarly, we might consider extending the empty tuple syntax to break a 1D domain down into its range using:
proc foo(X: [?r1, ]) { ... }
though this could be confusing if we also support proposed syntax for specifying that an array must be 2D (e.g., for interoperability purposes) as follows:
proc foo(X: [ , ]) { ... } // X must be 2D but we don't want to say what its indices are
Another way to express the case of breaking a 1D array's domain down into ranges might be to permit the curly braces to be specified, to imply that we're unpeeling the domain:
[Spun off of from issue #14590]
As a Chapel programmer, I'd like the ability to use Chapel's query syntax to pick the individual ranges out of a multidimensional array. For example, imagine:
where
Similarly, we might consider extending the empty tuple syntax to break a 1D domain down into its range using:
though this could be confusing if we also support proposed syntax for specifying that an array must be 2D (e.g., for interoperability purposes) as follows:
Another way to express the case of breaking a 1D array's domain down into ranges might be to permit the curly braces to be specified, to imply that we're unpeeling the domain:
test/arrays/formals/queryMultiDimByRange.chpl
#14608