Skip to content

Make MatlabStructArray an AbstractDict #239

Description

@matthijscox

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions