On Saturday, April 25, 2015 at 12:05:04 PM UTC-5, Marcus Appelros wrote: > > Which is exactly what should be possible to avoid, if we anyhow have to > define all the functions what is the meaning in descending from > AbstractArray? The usefulness of having an abstract Component is to make > concrete instances that retain all the abstract functionality. >
There is no generic way to implement all these methods, though. In a traditional object-oriented environment, these would be abstract methods--define these and then you can get more things for free. There is a generic implementation of `length()` you can get if you define `size()`: length(t::AbstractArray) = prod(size(t))::Int I believe you get `eltype()` and `ndims()` for free, too, looking at the definitions in abstractarray.jl.
