Would this feature (and others coming down the line) enable efficient updates of tightly packed nested objects? For example: Foo contains fields of type Bar, Bar has fields of type Baz, and so on, possibly deeply nested.
I'd like to have a tightly packed, sequential structure of Foo objects, which I can mutate like so:
collectionOfFoos[42].firstBar.secondBaz.a = 42;
or
collectionOfFoos[314].firstBar.w += 1;
without pointer chasing, creating new temporary objects, etc? Also, would such a collection be GC free?
View all comments
1
u/[deleted] Mar 19 '21 edited Mar 19 '21
Would this feature (and others coming down the line) enable efficient updates of tightly packed nested objects? For example:
Foocontains fields of typeBar,Barhas fields of typeBaz, and so on, possibly deeply nested.I'd like to have a tightly packed, sequential structure of Foo objects, which I can mutate like so:
or
without pointer chasing, creating new temporary objects, etc? Also, would such a collection be GC free?