Basically, what you are talking about is Software Transactional Memory.
there *is* STM support for Pharo at
although the last version there is from 2012, and there have been major changes to Pharo
since then, so it probably doesn't work any longer.
You could probably make a TransactionalObject class with a 'lastTransaction'
instance variable, and a noteChange method that checks if lastTransaction ==
Transaction current, and if not, pushes self -> self shallowCopy onto a stack
inside Transaction and sets lastTransaction to Transaction current.�� Then to
roll back a transaction, peel back original -> backup records from the stack
and do original copyFrom: backup for each of them.
Please don't ask me to think about combining this with concurrency.