Skip to content

Design: have data implementation for each type #8

@renaudpawlak

Description

@renaudpawlak
  1. every data should be a DataReference
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    optimizationMake the compilation or evaluation run fasterrefactoringBetter/simpler code organization/readability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions