Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 69bb72baf258288f7079fa9c24d9ea0b63c275a1
Ticket: 565823ffffffffffffffffffffffffffffffffff
inconsistent [namespace import] model
User & Date: dgp on 2002-06-07 13:54:00
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    When I [namespace import ::ns::foo], it is clear that I
    create a new command "foo" in the current namespace
    which refers to the command ::ns::foo.  But precisely
    what does it refer to?  Does it refer to the *name*
    ::ns::foo, or does it refer to the command that currently
    has the name ::ns::foo ?
    
    [namespace import] will not work on an undefined name,
    so it seems to indicate that the reference is to the actual
    command, not the name.  Furthermore, there are other
    ways to reference commands by name, including "wrapping"
    procs, and [interp alias].
    
    But, Tcl appears to try to have it both ways.  The
    implementation
    of [rename] does transfer import links from the old name to
    the new name, preserving the references to the command
    itself.
    But! the implementation of Tcl_CreateObjCommand also
    transfers import links from the original definition to
    the new
    definition when a command name is reused, preserving
    the references to the command name.
    
    That seems inconsistent to me.  Is it really intended
    to do both.
    If so, can it be better documented?
    
    
  4. foundin changed to: "obsolete: 8.4a5"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dgp"
  9. subsystem changed to: "21. [namespace]"
  10. title changed to: "inconsistent [namespace import] model"
  11. type changed to: "Bug"