This is not necessarily the current version of this TIP.
| TIP: | 157 |
| Title: | Argument Expansion with Leading {expand} |
| Version: | $Revision: 1.7 $ |
| Authors: |
Kevin B. Kenny <kennykb at acm dot org> Peter Spjuth <peter dot spjuth at space dot se> Donal K. Fellows <donal dot k dot fellows at man dot ac dot uk> Don Porter <dgp at users dot sf dot net> |
| State: | Final |
| Type: | Project |
| Tcl-Version: | 8.5 |
| Vote: | Done |
| Created: | Saturday, 20 September 2003 |
| Obsoletes: | TIP #144 |
This TIP proposes to add syntax in Tcl to perform argument expansion in a safe and efficient manner.
Many commands take a variable number of arguments and often you find yourself with those arguments in a list. This list must then be expanded into individual arguments to the command. This is currently done with eval:
eval destroy [winfo children .]
This is a bit obscure and also very error prone when the command becomes more complex. It is also inefficient and not object safe, why something specialised in doing this would be better.
See also TIP #103 and TIP #144. Please also see a summary of a poll of TCLCORE readers taken after TIP #103 was rejected. http://wiki.tcl.tk/9462