TIP 293: Argument Expansion with Leading {*}

EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA
State:		Final
Type:		Project
Tcl-Version:	8.5
Vote:		Done
Author:		Miguel Sofer <[email protected]>
Created:	02-Nov-2006
Obsoletes:	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.

Detailed Proposal

After two years experience with {expand}, this TIP proposes the following amendment to [157]:

  1. The officially sanctioned expansion syntax will henceforth be {*}, in replacement of the previous {expand}.

  2. The usage of both {expand} and {} will be deprecated.

  3. 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.