CMcC {et al} 2008-07-08:
Tcl contains some semantic equivalences. ~~ can be read as approximates. Add more if you find them. The idea is to find cases where there is more than one way to do it. The hunt is on.
In the following examples, [lindex] is used as the identity command, i.e., a command that returns its argument, verbatim.
Example:
set abc "123" set xyz $abc
or
set xyz [set abc]
Example:
[replace with example]
Example:
Using string can result in quoting hell for some strings while using subst is more verbose but "cleaner".
[replace with example]
Example:
set colors {taupe puce heliotrope} set countries {Djibouti Brazil Azerbaijan} set var "$colors $countries" set var [concat $colors $countries]
Example:
set var "1 2 3" set var {1 2 3} set var [list 1 2 3]
upvar #0 varname varname ~~ ::varname
Example:
set abc $::env(HOME)
or
global env upvar #0 env env2 set abc $env(HOME) set abc2 $env2(HOME)