CMcC 8/7/7 Tcl contains some semantic equivalences. ~~ can be read as approximates. Add more if you find them. The hunt is on.
Example:
set abc "123" set xyz $abc
or
set xyz [set abc]
Example:
[replace with example]
Example:
[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]
Example:
set abc $::env(HOME)
or
global env upvar #0 env env2 set abc $env(HOME) set abc2 $env2(HOME)
escargo 7/7/7 - Are you looking for examples how these are not equivalent? CMcC I changed it to 'approximates.'
For example, I seem to recall that [eval] does a round of substitution before evaluating its input. (Logically, it would seem to be necessary for [] !~ [eval], otherwise eval is just taking up space.)
And subst takes arguments that allow limitations on the substitutions.
LV I think what is being sought are cases where there is more than one way to do it, as the Perl community says. This could be cases of Tcl syntactical sugar (notational shortcut approximates).