Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fe74d70ea8af7e8e84838515683b5ce3da547165
Ticket: 707104ffffffffffffffffffffffffffffffffff
[interp alias] overwrites [rename]d alias
User & Date: msofer on 2004-09-11 22:06:07
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    
    I really do not like this patch, possibly because I am not
    yet sure that I understand all the reqs. It fixes this
    particular bug, but renders introspection even more buggy
    than what it already was.
    
    * interp-19.3: the new behaviour seems correct
        interp create a
        interp alias a foo a bar
        interp eval a {rename foo zop}
        interp alias a foo a zop
        catch {interp eval a foo} msg
        interp delete a
        set msg
    should indeed return {invalid command name "bar"} IMHO. In
    other words,I do expect that we have a redirection foo->zop->bar
     
    * interp-19.6: the new behaviour makes no sense to me, I
    would expect that
        interp alias a foo a bar
        interp eval a {rename foo zop}
        interp alias a foo a zop
        interp aliases a
    returns {foo zop}: foo is an alias for zop, zop is an alias
    for bar. The new return {::foo foo} is weird, and not
    helpful at all. Alias introspection is broken wrt to
    renaming. The patch fails to fix this, and introduces a new
    breakage IMO.
    
    OTOH, I confess that I seem to find the whole alias
    introspection rather unsatisfactory: why would I be
    interested in the *creation* name of an alias as opposed to
    its current name, as documented to be introspectable by
    [interp alias]? Looks to me like we turned some bugs into
    features. It seems to be related to the general confusion
    (in the docs, and parts of the code) between commands and
    their names. 
    
    I need to think some more about all this - looks like a more
    fundamental redesign may be in order.
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"