Hacker News new | ask | show | jobs
by mdaniel 443 days ago
Allow me to introduce you to upvar https://www.tcl-lang.org/man/tcl9.0/TclCmd/upvar.html and its uplevel friend https://www.tcl-lang.org/man/tcl9.0/TclCmd/uplevel.html

I cannot possibly imagine the horrors of frontend frameworks that can grab values, or execute, in someone else's context willy nilly

2 comments

Exactly, it's dynamic scoping. As far as I know, Tcl is the only language that still has this skeleton in its closet.
With great power comes great responsibility :-)