Skip to content
Tcl Source Code History Of Ticket 458892ffffffffff
Login

History Of Ticket 458892ffffffffff

Artifacts Associated With Ticket 458892ffffffffff

  1. Ticket change [4f05f32554] (rid 125752) by msofer on 2001-09-05 20:51:53:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. 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.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "3 Low"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "msofer"
    9. subsystem initialized to: "21. [namespace]"
    10. title initialized to: "Legal but irregular names ??"
    11. type initialized to: "Bug"
  2. Ticket change [936bac0daa] (rid 105812) by dgp on 2001-09-06 07:34:07:

    1. 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 "".
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [a176dce0c2] (rid 109714) by mic42 on 2003-01-21 06:11:25:

    1. 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.
      
      
      
    2. login: "mic42"
    3. mimetype: "text/plain"
    4. username: "mic42"
  4. Ticket change [b9b8043404] (rid 129203) by dgp on 2003-11-13 08:37:25:

    1. foundin changed to: "obsolete: 8.3.3"
  5. Ticket change [9c94040071] (rid 96165) by dgp on 2004-09-10 06:10:28:

    1. 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.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [c37e8e5250] (rid 111669) by dgp on 2007-10-31 23:35:26:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      status?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [5fc8820475] (rid 115876) by msofer on 2007-10-31 23:55:46:

    1. 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
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"