I'd be keen to see a simple example of this pattern in Lisp (or another language). Does anybody have a good link?
It's a simple pattern to implement. To make it a bit easier to use repeatedly, I've got a small helper class called JournaledCollection. You pass it serialize+deserialize callbacks for your item type, and it takes care of persistence in event logs.
For a while I was thinking about releasing my helpers as a project called LAUF, short for "Lame-Ass Un-Framework". Then one could say: "Most of my projects are LAUFable, I don't need anything more serious." (Awful dad jokes are a solid reason to publish open source, right?)
Never got around to it though, but if you're interested, I could put together an example.
sjl at alephnull in ~/Desktop
><((°> sbcl
[SBCL] CL-USER> (defparameter *name* "World")
*NAME*
[SBCL] CL-USER> (defun foo () (format t "Hello, ~A~%" *name*))
FOO
[SBCL] CL-USER> (sb-ext:save-lisp-and-die "session.core")
sjl at alephnull in ~/Desktop
><((°> sbcl --core session.core
[SBCL] CL-USER> (foo)
Hello, World
NIL