JuliaIO / JuliaIO/MAT.jl

Make MatlabStructArray an AbstractDict

Open
#239 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
293
Forks
79
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the MatlabStructArray implementation and comparing it with MatlabClassObject and the other struct/object types. Review Julia's AbstractDict interface alongside the existing key-value iteration, getindex, and setindex methods, then resolve the AbstractArray, class-array immutability, and type-parameter questions. Done means the supported interfaces and compatibility implications are clearly decided.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.