Overview
| Artifact ID: | 69bb72baf258288f7079fa9c24d9ea0b63c275a1 |
|---|---|
| Ticket: | 565823ffffffffffffffffffffffffffffffffff
inconsistent [namespace import] model |
| User & Date: | dgp on 2002-06-07 13:54:00 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- 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?
- foundin changed to: "obsolete: 8.4a5"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dgp"
- subsystem changed to: "21. [namespace]"
- title changed to: "inconsistent [namespace import] model"
- type changed to: "Bug"