Re: [TCLCORE] TIP #157: Argument Expansion with Leading {expand}
by Donald G Porter other posts by this author
Sep 24 2003 2:02PM messages near this date
Re: [TCLCORE] TIP #157: Argument Expansion with Leading {expand}
|
Re: [TCLCORE] TIP #157: Argument Expansion with Leading {expand}
> Like Michael, I just wish we had done it sooner so we could use $*foo and [*foo]
> or something more compact than {expand} - but I digress.
Here's a thought to consider.
Given that the poll says only a solution targetted for 9.0 will be
accepted, an incompatibility (preferably as small as possible) is
permitted.
So we could combine the word-prefix-syntax architecture of {expand}...
with the use of the somewhat more eye-pleasing prefix $* .
In current Tcl, a word that begins with literal $* will also begin with
literal $* after substitution. If we made use of $* as the expansion
prefix for a word in Tcl 9, then anyone expecting literal $* would be
forced to produce it via some substitution. For example,
set punctuation $*&!^@#
would have to become something like
set punctuation \$*&!^@#
or
set punctuation \u0024*&!^@#
That's the extent of the incompatibility. Probably less impact than
choosing ` . Perhaps less than the :: in command names incompatibility
from the 7 -> 8 transition.
Otherwise the modified proposal would be the same as TIP 157. Just
replace the prefix string {expand} proposed there with the prefix
string $* .
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@[...].gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Donald G Porter
=?ISO-8859-1?Q?Fr=E9d=E9ric_Bonnet?=
|