Open
Description
The AbstractArray
interface also encompasses the meaning of the type parameters: MyArray{T,N}
has eltype T
and dim N
. A trait LikeArray
ought to contain these two type parameters also, which in this context are associated types (at least Rust uses this term). Maybe this could be written as TraitAbstractArray{TT,2}(SomeTypeWhichIsAlsoArrayLike{P1,P2,TT})
, which would mean that SomeTypeWhichIsAlsoArrayLike{P1,P2,T}
belongs to the trait and that it has associated types eltype==TT
and ndims==2
. Note this syntax is different to the current syntax on master, where the type-parameters are occupied by the types fulfilling (or not) the trait.
Not sure this is SimpleTraits material but I thought I better write it down somewhere before I forget.
Metadata
Assignees
Labels
No labels
Activity