Skip to content

Commit

Permalink
Update immutability.md - fixed list numbering
Browse files Browse the repository at this point in the history
  • Loading branch information
poef authored Aug 9, 2024
1 parent cb3c542 commit 73625a6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions design/immutability.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Immutable JSONTag data

1 - When parsing jsontag data, each entry is frozen immediately after instantiation.
2 - Add a clone method to clone an object (shallow clone)
3 - a clone is mutable
4 - all objects linking to the original object get cloned as well, and the link updated to the new clone
5 - once all updates are done, you can freeze the root object again and it will also freeze all clones
6 - identity. Each object should have a clear identity, that is the same over mutations, as well as a static identity that changes with mutations. (one indentity-over-time, one identity-per-version)
7 - cleanup. Any object no longer linked should be removed, unless you want automatic versioning. In that case the root objects versions should all be kept, and therefor all objects remain linked.
1. When parsing jsontag data, each entry is frozen immediately after instantiation.
2. Add a clone method to clone an object (shallow clone)
3. a clone is mutable
4. all objects linking to the original object get cloned as well, and the link updated to the new clone
5. once all updates are done, you can freeze the root object again and it will also freeze all clones
6. identity. Each object should have a clear identity, that is the same over mutations, as well as a static identity that changes with mutations. (one indentity-over-time, one identity-per-version)
7. cleanup. Any object no longer linked should be removed, unless you want automatic versioning. In that case the root objects versions should all be kept, and therefor all objects remain linked.

## Problems

Expand Down

0 comments on commit 73625a6

Please sign in to comment.