aotto1968 <
[email protected]> wrote:
Hi,
This are MY rules for the new TCL
1) add a simple pre-processor to TCL like CPP for C and add all the
missing features like "(real)-comment" to top of this this
pre-processor
2) after preprocessing the OLD-Tcl parser get always "valid" TCL code
2) to activate a NEW featur use the new "pragma ?feature?" command
3) every TCL-Source-File is read with *source* and source is able to
analyze the *pragma* and chose the proper pre-processor
4) A *pragma* is only valid WITHIN the singe source-file currently read
(ease mix OLD and NEW style code)
This is actually quite possible. One of the absolute streghts of Tcl is,
that the language is programmable itself. You can redefine every command,
and as control constructs are commands themselves, you can redefine them as well.
Have a look at „sugar“, a Lisp-like macro preprocessor for Tcl:
https://wiki.tcl-lang.org/page/Sugar
It is likely to help. And, as already mentioned, yes, have fun :-)
BTW, I wish that a real and enhanced macro preprocessor like sugar was
built into the Tcl core. It‘s something that I think would add a real
benefit to the language…
--
EL
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)