Background: the map/list distinction was not present in the very first versions as got hacked in, leaving something that is not explicit and clean.
Terms:
- Map: associative array. Key matters. Diffs can contain change operations and diffs
- List: array with numeric keys. Comparison by values. Diffs can only contain add and remove operations
Pain points:
- Only one Diff class, rather than a MapDiff and ListDiff. (Those classes actually existed at some point, though as subclasses of Diff, inheriting nearly everything)
- The Diff class takes an
$isAssociative flag, though constructing it with this set to false AND associative operations results in no error
- The Diff class is a mess
- All differs implement the Differ interface. All services needing a differ just request a Differ. Since the Differ has no info on if it is doing an associative diff, such services cannot restrict the type of differ, know what kind of operations to expect or know what flag to pass to the Diff class.
- Non-associative patchers (and other services) cannot clearly specify they only deal with non-associative diffs
Background: the map/list distinction was not present in the very first versions as got hacked in, leaving something that is not explicit and clean.
Terms:
Pain points:
$isAssociativeflag, though constructing it with this set to false AND associative operations results in no error