giordano/StarWarsArrays.jl

Implement `axes` and `iterate`

Opened this issue · 6 comments

This package currently implements only the basic AbstractArray interface, but not the optional methods such as iterate or axes, which leads to some funny (and wrong) results.

Mostly addressed by f1e687f, 4f90098, and fe8a413. The main remaining issue I see is that now collect(::StarWarsArray) fails (it didn't use to up to 8e41eef)

axes is supposed to return

a tuple of AbstractUnitRange{<:Integer} of valid indices

How do you think you can do a AbstractUnitRange{<:Integer} for this indexing?

I suppose that axes only has to return valid indices. They do not have to be in iteration order.

They do not have to be in iteration order.

Can't we just add that requirement to the AbstractArray docs? It seems like a complication and I'm not seeing much advantage.