News for hackers. Stuff that matters.
Re:Clojure and the technology adoption curve by klibertp on Tuesday November 10, 2015 @10:41AM (#10539960)
Your Python example wouldn't work. eval is still scoped lexically. You'd need to get current stack frame, get locals from the previous frame and only eval within these locals. That's what TCL `upvar` does, BTW.

Macros let you avoid this kind of problems when meta-programming (but then they bring their own problems: hygiene, for example).

Re:Clojure and the technology adoption curve by S4M on Tuesday November 10, 2015 @11:01AM (#10540085)
Good point, I haven't really thought the Python example through. I can't find a quick fix now, so I leave it as an illustrative code (even that failing code is an inferior version of the macro, so...).