Open
Description
openedon May 13, 2018
As noted at #26775, we currently allow custom lastindex
and firstindex
implementations to return non-Int
values. For example, Date
ranges use an Int64
index, and their last index (and length) cannot always be represented using an Int
on 32-bit.
In PR #26775, this required defining lastindex
and firstindex
in terms of eachindex(IndexLinear(), x)
rather than of LinearIndices(x)
. While it's not really an issue in practice, the fact that LinearIndices
is not always able to represent the indices of ranges could be considered as a problem.
Is this really the desired behavior, or should we require that indices be Int
?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment