3 ms·
Tcl's syntax is sufficiently simple that you can write something that parses it in Tcl, and there's examples of doing that to do more complex metaprogramming al
by mst 7y ago
Tcl's syntax is sufficiently simple that you can write something that parses it in Tcl, and there's examples of doing that to do more complex metaprogramming all over the wiki.
Plus things like uplevel let you jam a lot of meta trickery into commands without needing AST manipulation.
So, yeah, you do get both capabilities, it's just done atop the very simple baseline system, if that makes sense.
(look at e.g. 'snit', a pure Tcl OO system, as an example of what can be done with just Tcl itself)