Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0e3133c44137ef618443b7a6c157f1411ab8e75c
Ticket: 3408408fffffffffffffffffffffffffffffffff
Erratic sharing/duplication of values in [expr]
User & Date: dgp on 2011-09-16 02:06:53
Changes

  1. icomment:
    
    Unfortunately tackling the specific case in the
    ticket is at least difficult.  It's long been the (unwise?)
    design of [expr] to not embrace "everything is a string"
    but impose on [expr] the burden of producing only
    'normalized' string reps of numbers:
    
    % expr 7.5000
    7.5
    % expr 0x1
    1
    
    It's precisely when a literal value 
    is bubbling up from the leaf of an
    expression tree to become the result
    of the expression that we do not know
    whether or not it's already in normalized
    form.  The TRY_CVT_TO_NUMERIC 
    instruction is pushed to enforce the guarantee
    and the way it operates is to produce a new
    unshared value.
    
    Absent a revolution where we at long last let
    [expr] embrace the EIAS philosophy, I don't 
    see any quick and simple path to improve this.
    And for now, I don't have the cycles to spare
    for something more ambitious.  Sorry.
    
    
  2. login: "dgp"
  3. mimetype: "text/plain"
  4. resolution changed to: "Postponed"
  5. username: "dgp"