Artifacts Associated With Ticket 458892ffffffffff
Ticket change [4f05f32554] (rid 125752) by msofer on 2001-09-05 20:51:53:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The character ":" is a legal character for variable and command names - with the proviso that it cannot appear doubled: a::b is the name of variable (or command) 'a' in the namespace 'b'. Variable and command names that start with ":" are legal, but behave differently: the following script set a 1 set :a 2 namespace eval tst { proc tst var { set [uplevel namespace current]::$var } } puts "($a [set a] [tst::tst a] ${:a} [set :a] [tst::tst :a])" returns (1 1 1 2 2 1) instead of (1 1 1 2 2 2). I see two possible fixes to this: - stop interpreting any sequence of two or more ":" as a namespace separator. - forbid ":" as first character in a name Namespace names probably show similar irregularities, with a vengeance. - foundin initialized to: "None"
- priority initialized to: "3 Low"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "msofer"
- subsystem initialized to: "21. [namespace]"
- title initialized to: "Legal but irregular names ??"
- type initialized to: "Bug"
Ticket change [936bac0daa] (rid 105812) by dgp on 2001-09-06 07:34:07:
- icomment:
Logged In: YES user_id=80530 Note that the rule of collapsing all runs of 2 or more ':' into one namespace separator also makes it difficult to make use of a namespace named "".
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [a176dce0c2] (rid 109714) by mic42 on 2003-01-21 06:11:25:
- icomment:
Logged In: YES user_id=302287 Namespace names have similar irregularities: % namespace eval ::foo::bar: {set a 1; namespace current} ::foo::bar: % namespace eval ::foo::bar: {namespace eval baz {set a 1; namespace current} ::foo::bar:::baz % namespace children ::foo::bar: ::foo::bar:::baz % set ::foo::bar:::baz::a can't read "::foo::bar:::baz::a": no such variable % namespace eval ::foo::bar: { set baz::a} 1 The man page is unclear about this, it states that : in names are ignored, but they are not. % namespace eval ::foo::bar:baz {namespace current} ::foo::bar:baz So, introspection does work for peculiar namespaces, but using the results of this introspection does not always work as expected. - login: "mic42"
- mimetype: "text/plain"
- username: "mic42"
- icomment:
Ticket change [b9b8043404] (rid 129203) by dgp on 2003-11-13 08:37:25:
- foundin changed to: "obsolete: 8.3.3"
Ticket change [9c94040071] (rid 96165) by dgp on 2004-09-10 06:10:28:
- icomment:
Logged In: YES user_id=80530 Re-reading this, it looks at lot like TIP 184 (Bug 600812) to me. That let us create variables we couldn't act on. This flaw also lets us create things with names we can't act on.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [c37e8e5250] (rid 111669) by dgp on 2007-10-31 23:35:26:
- icomment:
Logged In: YES user_id=80530 Originator: NO status?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [5fc8820475] (rid 115876) by msofer on 2007-10-31 23:55:46:
- icomment:
Logged In: YES user_id=148712 Originator: YES Status unchanged, IMO we have to live with this until 9.0: * The identity of a:::b and a::b is longstanding and documented, probably used at lots of code in the wild in some variety of set FQname [namespace current]::$name * Every char is valid in any name in Tcl; not sure it is advisable to start considering exceptions
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment: