From: Andreas L. <av...@lo...> - 2012-11-20 11:58:15
|
"Martin Lemburg" <mar...@gm...> wrote: > In some scripts I use data as "identifier" storing additional information about > this data in a variable, named using this data. I don't build indexed variable > names, I simply use unique data, e.g. retrieved via http, as variable names. > I don't know, and I don't care about the string used as variable name ... > as long tcl accepts them! > Limiting variable names e.g. to alphanumeric characters would destroy this "easy going". This needs a quick explanation. My focus is not on variable names as such, but only about variable names acceptable for $... or ${...} substitution. Thus, unless you do (oh-so-wrong!) "eval handle \$$varName" style code, you wouldn't even notice the change. Variables names would still be allowed anything (with the 8.0+ caveat for ::, of course) but you'd *have to* use [set ugly\{\[varname] instead of ${ugly{[varname}. I'd dare to bet, you already do, with the arbitrary varname probably stored in another, nicely-named var. [set $varName] |