Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 819c7f29fcf3cddeeee4407e2b1dea436cebcfe2a901afc4491de7942b0c6ff1
Ticket: f14b33ec9f900721ce156147ebd418ff7b930117
changed behaviour wrt command names, namespaces and resolution
User & Date: oehhar on 2024-09-09 09:33:34
Changes

  1. icomment:
    As this change is apparently intentional, it should be mentioned in the migration notes:
    
    [https://core.tcl-lang.org/tcl/wiki?name=Migrating+scripts+to+Tcl+9&p], probably chapter "Change in variable name resolution".
    
    I always thouht it personally useful, that namespaces could be constructed by concatenation. Due to that, "::::" was allowed.
    
    And it still works (TCL 9.0b3):
    
    <verbatim>
    % namespace eval ::n1 {variable v1 v1}
    % set ::n1::v1
    v1
    % set ::::n1::v1
    v1
    % set :::n1::v1
    v1
    % set :::n1::::v1
    v1
    % set :::n1:::v1
    v1
    % proc ::n1::p1 {} {puts p1}
    % ::n1::p1
    p1
    % :::n1::p1
    p1
    % :::n1:::p1
    p1
    % n1::p1
    p1
    % n1:p1
    invalid command name "n1:p1"
    </verbatim>
    
    Quite interesting....
    
    Thank you for all,
    Harald
    
  2. login: "oehhar"
  3. mimetype: "text/x-fossil-wiki"
  4. username: "oehhar"