For better consistency with MatlabClassObject and other structs/objects, and backwards compatibility with previous MAT versions, we could consider making the MatlabStructArray <: AbstractDict. I think most dict interfaces are already implemented, like key-value iteration, getindex and setindex.
I'm consider what the implications are here:
- it's actually an
AbstractDict{String, Array{Any,N}}, not AbstractDict{String,Any} like all our other types
- could we still consider it an
AbstractArray, an interface I still want to implement someday so that s[1,2] returns a Dict
- we should add all abstractdict interfaces (what is the abstractdict interface anyway?)
- need to add keys/names
s["new"] = arr
- delete keys:
delete!(s, "old")
- Unless it's a class array, then it should be immutable, since the class properties are fixed?
For better consistency with
MatlabClassObjectand other structs/objects, and backwards compatibility with previous MAT versions, we could consider making theMatlabStructArray <: AbstractDict. I think most dict interfaces are already implemented, like key-value iteration, getindex and setindex.I'm consider what the implications are here:
AbstractDict{String, Array{Any,N}}, notAbstractDict{String,Any}like all our other typesAbstractArray, an interface I still want to implement someday so thats[1,2]returns a Dicts["new"] = arrdelete!(s, "old")