Sujet : Re: Tcl9: source files are interpreted as utf-8 by default
De : wortkarg3 (at) *nospam* yahoo.com (Harald Oehlmann)
Groupes : comp.lang.tclDate : 10. Jan 2025, 17:42:25
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vlrilh$4j93$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
User-Agent : Mozilla Thunderbird
Am 10.01.2025 um 13:09 schrieb Uwe Schmitz:
Another thing that hurts me and is off-topic here (sorry):
The changed variable name resolution also affects itcl::class
defintions. The following leads to an error:
::itcl::class A {
public common tclVersion $tcl_version
}
Because the ::itcl::class commands open a namespace, the resolution
of the global variable tcl_version doesn't succeed. You
have to use the complete path $::tcl_version.
Yes, that is intentional and important. And Ashoks migration tolls also catch this.
The issue in TCL 8.6 is:
namespace eval test { set test A }
Works as follows:
- if test exists in the global namespace, the global is set.
- if test does not exist in the global namespace, a namespace variable "test" is created.
This feature had the consequence, that namespace variables sometimes overwrote global variables, but were intended as namespace variables.
In TCL 9, this will always address a namespace variable.
Take care,
Harald