'''Code is data''' — that a piece of code is also a piece of data, and can be handled as such — is one of the hallmarks of [dynamic language]s. At the machine level this is an obvious consequence of the von Neumann architecture for computers, but few mainstream programming languages have provided any facilities for letting code act on code. All but the most trivial Tcl programs rely on the fact that [code is data], since Tcl's control structures are ordinary commands which take some script(s) as argument(s) and arranges for these to evaluated: [if], [for], [foreach], [while], [proc], [catch], [uplevel], … The classical language where [code is data] is [LISP], since (in Tclish terms) any LISP command is also the list of the words of that command, and can be accessed as the elements of any other list. Tcl is formally just as powerful since [everything is a string], but it is usually not practical to have Tcl code take Tcl scripts apart and modified, since there are few facilities available out of the box for handling Tcl scripts at a higher level than that as a string of characters (there are packages for this, however). What ''is'' straightforward to do is storing code anywhere data can be stored, manufacturing code from arbitrary data ([list]-quoting), and combining pieces of code to larger pieces of code. The net effect is that existing code is mostly opaque to Tcl, but can be used and manipulated. ---- !!!!!! %| [Category Concept] |% !!!!!!