Future directions of Julia

Writing index-independent code is fine.
However, if you want to use non-1-based-indexing, you need an implementation somewhere.
As pointed out, it seems that the external implementation provided by OffsetArrays commits type-piracy.

I guess my point was that OffsetArrays could continue to use simple convenient syntax with type-piracy:

OA = zeros(-1:1, 0:4)

Or OffsetArrays could change implementation to avoid type-piracy with less -convenient syntax:

OA = zeros(OffsetArray, -1:1, 0:4)   # or similar

Or OffsetArray implementation could be brought into Base.

Or something else …

1 Like