O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Tcl Compiler

The Tcl Compiler is an on-the-fly compiler that is virtually transparent to Tcl scripts. The compiler translates a script to byte codes the first time it evaluates it. If the script is evaluated again, such as in a loop or in a procedure body, then the byte codes are executed and the translation step is saved. If a procedure is redefined, then the compiler discards any translated byte codes for it.

The compiler uses a dual-ported object model instead of the simple string-based model used in earlier versions of Tcl. The dual-ported objects hold a string value and a native representation of that string such as an integer, double-precision floating point value, or compiler byte codes. This makes it possible to save translations ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required