eliminate closing over cursors
swannodette opened this issue · comments
We need to get rid of closing over cursors when we save the arguments to transact in the -om-swap!
implementation. worlds.core/sprout!
should probably return a new kind of reference value that holds information about the owner instead.
Actually we just need to ensure that world.core/commit!
uses the cursor it is given. There is still the problem of deref
on a world, the stored thunks may be stale.
The deref
problem can be solved via worlds.core/sprout!
, we can return a cursor with the functions applied to it. We can use the cursor to look up the list of functions for that cursor in the world.
An alternative strategy would just be the cache the value of the cursor.
fixed in master http://github.com/swannodette/worlds/commit/8dad1f49efe93697bd7e23aa10ce2b956109a396. No caching at this point.