|
|
|
|
|
by BoingBoomTschak
620 days ago
|
|
Tcl totally has lexical scoping, through proc and apply that create a new frame and thus new local bindings. Closures with explicit bindings (as opposed to tree-walking to find free variables to match with [info locals] which is something Tcl really can't do due to its "list == atom" thing) are easy to do through apply and a way to store the environment. The last implementation in https://wiki.tcl-lang.org/page/Closures is pretty nice. |
|