TIP: | 293 |
Title: | Argument Expansion with Leading {*} |
Version: | $Revision: 1.4 $ |
Author: | Miguel Sofer <msofer at users dot sourceforge dot net> |
State: | Final |
Type: | Project |
Tcl-Version: | 8.5 |
Vote: | Done |
Created: | Thursday, 02 November 2006 |
Obsoletes: | TIP #157 |
Tcl shall use {*} to denote argument expansion, replacing the current {expand}.
There seems to be a consensus that the functionality of {expand} is exactly what was needed, but the syntax could be nicer. The problem, both back in 2003 and today, is that there is no general agreement on which is the best one. However, the issue of ugliness is regularly revived in the mailing lists so it is not going away soon. Moreover, an alpha release in a popular distribution allows the use of {} instead of {expand}.
A compromise solution, {*}, is less verbose and "ugly" than {expand}, and less prone to typographical errors than plain {}. It is inspired using the mnemonic that the character "*" is already used to denote "all items" in other contexts.
After two years experience with {expand}, this TIP proposes the following amendment to TIP #157:
The officially sanctioned expansion syntax will henceforth be {*}, in replacement of the previous {expand}.
The usage of both {expand} and {} will be deprecated.
This is a syntax-only change.
Note that this TIP removes {expand} and {} as prefix-syntax, which will break code that users might already have in production based off earlier alpha release of 8.5.
This document has been placed in the public domain.
[Index] [History] [HTML Format] [Source Format] [LaTeX Format] [Text Format] [XML Format] [*roff Format (experimental)] [RTF Format (experimental)]
TIP AutoGenerator - written by Donal K. Fellows