- every data should be a DataReference
- depending on the type/context, we will switch the implementation (ListData, RawData, ArrayData, ObjectData)
Note: this opens potential optimization.
- keep all the instances until a data modification invalidates them
- if no data modification, we can switch back and forth for the right implementation to maximize peformance
=> note also that DataReference are flowed in the design... for instance:
l = [["a"],["b"]]
s = l[0]
swap(l[0], l[1])
This changes the value of s when swapping because s is a reference (i.e. when s is not a primitive object). IMO, the reference system has to be entirely rethought.
Note: this opens potential optimization.
=> note also that DataReference are flowed in the design... for instance:
This changes the value of s when swapping because s is a reference (i.e. when s is not a primitive object). IMO, the reference system has to be entirely rethought.