I read the "interfaces 
<http://docs.julialang.org/en/latest/manual/interfaces/>" chapter of the 
documentation today. I learned that, if you define an iterable as a subtype 
of AbstractArray, with only defining three methods (including `size()`, 
excluding `start()`), you can iterate on it just like iterate on an normal 
Array.

I think this advantage is based on the convention that Julia Array is 
1-based. That's why @Matt mentioned: "it (OffsetArray) would be safest if 
they weren't listed as subtypes of AbstractArray"



On Monday, August 17, 2015 at 3:43:13 PM UTC+2, LarryD wrote:
>
> Fortran offers the ability to arbitrarily set array limits, e.g." real 
> x(-30:40, 0:100)".  This is very useful when using an array to represent 
> grid points on a dimensioned physical structure with, say, (0,0) somewhere 
> in the structure. Is there any chance that this could be added to an 
> upcoming version of Julia?
>
> LarryD
>
>

Reply via email to