3 ms·
can you outline a sketch? closures by themselves do not guarantee the absence of side effects ie: (let ((state 'someobject)) (defun phase1 () (done
by utx00 17y ago
can you outline a sketch? closures by themselves do not guarantee the absence of side effects ie:
(let ((state 'someobject))
(defun phase1 ()
(done1 state))
(defun phase2 ()
(done2 state)
.
.
.
and so on
- joeyo 17y agoSure; there's no silver bullet. My remark about closures was more to address his criticism that packaging up and passing around state was too much work to be worth it. Programming in Lua has a nice example of a maze game where state is passed around by emitting functions. It's a toy problem, but I think it's instructive: http://www.lua.org/pil/6.3.html http://www.lua.org/pil/6.3.html