[PWQ] 2 Jan 04. There may be a ways of implementing radical changes to the operaton of TCL to achieve such things a mapping [dict] to [array] values and Metaprogramming without doing any modification to the core. If TCL is compiled with [stubs] support, then it should be possible to replace the Tcl_Parser* functions to implement what ever associations are required. This means that people could make radical changes to the core from an extension that links into any standard tcl runtime. And the TCT never has to know, care , or comment. The process would be. 1. Get stubs address. 1. Depending on platform, stubs table may have to be copied to writeable memory. 1. Load extension that remaps Core procedures. 1. Call extension to remap core procedures as desired. 1. source script files. 1. Restore Tcl core procedures. 1. Run program as normal. One fly in the ointment is that all procs must be compiled on loading to ensure they are parsed when the new parser is in effect. Also if any of the core functions such as ''set'' are redefined then the procs will get recompiled. By placing the procs in a namespace should prevent this, though I am not sure. To do the ''dicts<->arrays'' may require replacing Tcl_*Get/SetVar* to process references at runtime. If the installed parser replaces the reference with a command call then this would not need to be done. However the parser may have toknow the type of the variable at compile time which is definately suboptimal. This technique would also be used to test out new ideas for future changes to TCL's internals without having to make any changes to the core. To be truely useful, you probably would have to be able to add entries to the stubs table at run time so that you can emulate new core functions that can be called from extensions. Please comment on feasibility, IE can you remap stubs procs at runtime? It sounds too easy, so I suspect there will be something in the internals that prevent it being as useful as it sounds. ---- [Category Suggestion]