Version 0 of Many ways to eval

Updated 2002-12-18 18:18:09

Tcl commands are evaluated if the command name is the first word, at the beginning of a line or when bracketed. eval evaluates its arguments in some special ways (concateneates to a string, if not a pure list). Here are some apocryph alternatives:

Andreas Leitgeb pointed out on the comp.lang.tcl newsgroup (2002-08-07) that

 if 1 $cmdis clearly faster then

 eval $cmdSee [Many ways to eval] for the ensuing discussion.

MS explained: "Well: eval does not bytecompile the script as it is "usually" used for one-time scripts ... For more fast-and-surprising ways to do it, try one of

     interp eval {} $x
     namespace eval :: $xas they both will compile the script."