20105, "bradcray", "Should ranges/domains be able to be strided by any integral type?", "2022-06-29T00:57:13Z"
Today, when applying
by to a range, the integer
step value provided to it must be of an integer type whose width is less than or equal to that of the idxType. Similar to the argument in #20085 about the
# operator, this seems like an annoying constraint, particularly when working with ranges of small integer type, particularly given that integers are large by default in Chapel (so applying a stride of
int(64) type seems like a common occurrence whatever the
idxType of the range itself).
For that reason, this issue proposes to permit
by to accept any integer and to rely on bounds checking to ensure that it's safe rather than assuming a wide integer type will necessarily store a large value, as we arguably current do. Other arguments in #20085 about how
# is not similar to
+ in its symmetry w.r.t. its arguments apply here as well.