@halcy update: so, as expected, the simple case doesn't work in common lisp, clojure, or scheme
that means that this would need to probably be done inside a special let form that would replace all names inside those blocks with gensym'd ones instead, so they can only be resolved locally, and the ones that don't would just fail
hee, i've never tried to avoid making a closure before!
@halcy alright! i have a naive version of this working!
basically the
anti-scope
macro is a let form that makes random names for the things you bind to it, and then replaces all the symbols in the body to be those random names. if it can't find a name, it looks in the namespace, or errors out failing thatso! of the two let forms at the bottom, only the first one works because
a
wasn't brought into the scopethe second pic is what the first test expands to so you can see what's happening~