Currently, Julia defines
typealias StridedArray{T,N,A<:Array} Union(Array{T,N}, SubArray{T,N,A})
It seems like it would be better to define
abstract StridedArray{T,N} <: AbstractArray{T,N}
and have Array and SubArray both inherit from StridedArray.
The reason is that I would like to define a new StridedArray type (wrapping a NumPy ndarray). There is no reason, as far as I can tell, that I can't provide all the functionality of a SubArray and be used everywhere the latter is usable, but currently it does not seem possible to do this. Changing to abstract StridedArray would fix this.
Currently, Julia defines
It seems like it would be better to define
and have
ArrayandSubArrayboth inherit fromStridedArray.The reason is that I would like to define a new
StridedArraytype (wrapping a NumPyndarray). There is no reason, as far as I can tell, that I can't provide all the functionality of aSubArrayand be used everywhere the latter is usable, but currently it does not seem possible to do this. Changing toabstract StridedArraywould fix this.