JuliaArrays / JuliaArrays/StaticArrays.jl
`FieldArray` could display better
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 844
- Forks
- 159
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
A FieldArray displays as an array, values only. It would be great if it showed the field names too---named fields are presumably the reason to use a FieldArray in the first place.
julia> using StaticArrays
julia> Base.@kwdef struct Foo <: FieldVector{2,Float64}
bar::Float64
baz::Float64
end
Foo
julia> Foo(bar=3.0, baz=5.0)
2-element Foo with indices SOneTo(2):
3.0
5.0
Compare LabelledArrays.jl:
julia> using LabelledArrays
julia> SLVector(bar=3.0, baz=5.0)
2-element SLArray{Tuple{2}, Float64, 1, 2, (:bar, :baz)} with indices SOneTo(2):
:bar => 3.0
:baz => 5.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the FieldArray display implementation and inspect how field names are represented. Compare its output with the LabelledArrays example; done means named fields such as bar and baz appear alongside their values, with coverage for the revised display behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100