This is what I tried to raise in the review as well, but unfortunately it wasn't discussed.
The thing is observing didSet
s is not enough. willSet
has the invariant "subscribers will receive a notification before anything is changed", but didSet
doesn't have the invariant "subscribers will receive a notification after everything is changed". To support this invariant we need transactions.
8 Likes