-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
For Record and RecordArray and SlotRecord etc., currently we have code like this:
AwkwardArray.jl/src/all_implementations.jl
Lines 2097 to 2100 in 6ba1c4a
| Base.getindex( | |
| layout::Record{FIELDS,CONTENTS}, | |
| f::Symbol, | |
| ) where {FIELDS,CONTENTS<:Base.Tuple{Vararg{Content}}} = layout.array.contents[f][layout.at] |
This is blocking usage such as cms_events[1].pt, to unblock it, this can be re-written into:
Base.getindex(layout::Record, f::Symbol) = getfield(layout, :array).contents[f][getfield(layout, :at)]
Base.getproperty(layout::Record, f::Symbol) = layout[f]of course we don't have to manually do getfield() if we can come up with an internal API for this.
ianna
Metadata
Metadata
Assignees
Labels
No labels