In a painting software defining TabletPoint which contains .position (a vector field).
I have []TabletPoint.
I have a transform library which acts on vectors and doesn’t bother with TabletPoint. It’s not coupled.
I am writing transform.alignPoints([]@Vector(2, f32), other_params...) which only needs to act on the .position field by reference.
However, that would mean allocating that list of references.
I wonder if there is a way to go for accessing the .position field of my existing []TabletPoint… yet without having to import TabletPoint…
Even if I abstract it as an anytype or so, I would still enforce it has a field that is named .position I guess? That would feel half-way done…
Separating fields in a MultiArrayList would be a cumbersome solution, as the fields of the TabletPoint are all unique to each point.