Artifacts Associated With Ticket 565823ffffffffff
Ticket change [69bb72baf2] (rid 103302) by dgp on 2002-06-07 13:54:00:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized 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 initialized to: "obsolete: 8.4a5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "21. [namespace]"
- title initialized to: "inconsistent [namespace import] model"
- type initialized to: "Bug"
Ticket change [9671c9a2d8] (rid 106329) by dgp on 2002-06-07 21:00:58:
- icomment:
Logged In: YES user_id=80530 oops forgot to attach the illustrative examples. reference follows redefinition: % namespace eval one { namespace export foo proc foo {} {puts foo} } % namespace eval two namespace import ::one::foo % two::foo foo % proc one::foo {} {puts new} % two::foo new But reference also follow rename: % namespace eval one { namespace export foo proc foo {} {puts foo} } % namespace eval two namespace import ::one::foo % two::foo foo % namespace origin two::foo ::one::foo % rename one::foo one::bar % two::foo foo % namespace origin two::foo ::one::bar - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [b4a957e857] (rid 125079) by dgp on 2004-09-10 00:00:01:
- assignee changed to: "dgp"
- closedate changed to: "2004-09-09T17:00:01"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 both these features are useful. Withdrawing this report.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "dgp"