On Mon, Dec 22, 2025, 12:20 PM David McClain <[email protected]>
wrote:

>
> > BECOME takes a functional closure, which contains its state within the
> closure vars. But I have become frustrated with too many BOA args, and I
> also implemented a kind of dictionary to carry state with items labeled by
> a keyword.


Right.  I saw your file 'actor-state.lisp' and thought "Ah!  This is a
functional map.  This man needs FSet."

Yes, the state is in the closure vars, but that doesn't preclude it being
large and complex.  With functional data structures, you can efficiently
prepare an updated version of a large structure without invalidating the
previous version.  If something goes wrong before the BECOME takes effect,
no harm has been done; the tentative new version simply becomes garbage.
The trick is to use only O(log n) space each time, where n is the size of
the previous version.

-- Scott

Reply via email to