Implementing dynamic scope for Fennel and Lua
I’m continuing my work on fennel-cljlib, my port of clojure.core and some other core libraries, focusing on porting missing functions and features to it. One such feature, which I sometimes miss in Lua and Fennel, is dynamic binding. The Lua VM doesn’t provide dynamic scoping as a language feature, and Fennel itself doesn’t introduce any concepts like Clojure’s Var . However, we can still implement dynamic scoping that works similarly to Clojure and other Lisps using the debug library. Most of