Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2891dc2baa7cc42c3d816ec587978946f90283ab
Ticket: 1881766fffffffffffffffffffffffffffffffff
Mutability
User & Date: ferrieux on 2008-03-08 23:50:24
Changes

  1. closedate changed to: "2008-03-08T16:50:24"
  2. closer changed to: "ferrieux"
  3. icomment:
    Logged In: YES 
    user_id=496139
    Originator: YES
    
    Miguel found a conceptual show stopper: iterators.
    
    Indeed, the caller and the callee of a mutability-unaware iterator (like [foreach], which could be made mutability-aware, but extensions are allowed to declare other similar unaware functions) can cooperate to render invalid pointers kept locally in the iterator's implementation (like a pointer into a mutable list's elements array).
    
    The bottom line is that "cheating" with Tcl_IsShared is fundamentally problematic. Hence the only sound way of promoting in-place operations is to make it relatively easy to render objects truly unshared, through idioms like upvarring a global, *and* to implement optimized in-place modes wherever it is useful, like in [lrange] (see patch 1890831).
    
    Consequently, I close this tracker entry.
    
    
  4. login: "ferrieux"
  5. mimetype: "text/plain"
  6. status changed to: "Closed"
  7. username: "ferrieux"