[design] `.indices` queries on arrays => local representation of indices

Hi Chapel Community —

A recent trend for indexable types in Chapel has been for them to support a .indices query which returns all of the indices supported by that type in a closed form. For example, tuples, strings/bytes, and lists all support .indices queries that tend to return 0..<size.

For a few releases now, arrays have also supported a .indices query, which has been a synonym for the long-term .domain query that they've supported (since an array's indices are represented by its domain). Originally, it was thought that maybe this would be an opportunity to remove support for the .domain query on arrays, unifying it with other indexable types, but that proposal wasn't very popular. As a result, we have had two synonyms for saying the same thing (Arr.domain and Arr.indices), which is something we typically try to avoid.

A recent revised proposal is to have .indices return a local representation of the array's indices rather than its domain. For example, for a distributed array Arr, Arr.domain would return Arr's distributed domain, while Arr.indices would return a normal / local domain representing its (global) indices. This proposal has been received much more positively, and would eliminate the redundancy between A.indices and A.domain that we have today.

Here, I'm asking whether anyone has any significant concerns about this direction. If so, please let me know by commenting on issue 17883, replying in this thread, or letting me know via direct message.