Skip to content
Tcl Source Code History Of Ticket 433252
Login

History Of Ticket 433252

Artifacts Associated With Ticket 433252

  1. Ticket change [7246563d7d] (rid 100828) by msofer on 2001-06-14 21:44:52:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The rule for when a read trace fires seem capricious:
      consider
      
          trace variable x r {puts hello;#}
      
      * [append x 1] does not fire (even if x is a pure list)
      * [append x {}] does not fire 
      * [append x] fires
      * [lappend x 1] fires (even if x is a pure list)
      * [lappend x] fires
      
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "msofer"
    9. subsystem initialized to: "07. Variables"
    10. title initialized to: "Better coherence in traces"
    11. type initialized to: "RFE"
  2. Ticket change [03c0375097] (rid 119875) by msofer on 2001-06-15 05:00:22:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Forgot one: [info exists x] does not really read the value,
      but the read trace is fired ...
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  3. Ticket change [afa38770b7] (rid 97852) by fbonnet on 2001-06-18 14:39:51:

    1. icomment:
      Logged In: YES 
      user_id=93873
      
      both append and lappend eventually return the value of the 
      variable, so they should both fire a read event whatever 
      the arguments
      
      
      
    2. login: "fbonnet"
    3. mimetype: "text/plain"
    4. username: "fbonnet"
  4. Ticket change [880c39a367] (rid 131802) by welch on 2001-06-21 11:02:48:

    1. icomment:
      Logged In: YES 
      user_id=89720
      
      The reason that "info exist" fires a read trace is so you
      can
      simulate variables that don't really exist, or that require
      fabrication
      on the fly.  In particular, this change was made to support
      variables
      shared among different Tcl interpreters running in different
      threads.
      
      I can't speak to the quirkiness of append vs. lappend,
      except to
      speculate that it is a performance optimization.
      
      
    2. login: "welch"
    3. mimetype: "text/plain"
    4. username: "welch"
  5. Ticket change [07efb42ba5] (rid 89489) by nobody on 2001-06-23 00:01:11:

    1. icomment:
      Logged In: NO 
      
      It wasn't the best design decision to allow traces on
      non-existant variables, but here we are.  Most programmers
      expect "info exists varName" to be non-invasive.  This
      was changed and then changed back to the current behavior.
      
      As far as traces firing or not firing on append or lappend
      operations, it probably doesn't matter.
      
      I can't think of a situation where I would want to put a
      read trace on a variable I was appending to.  I might
      put a write trace to make it read-only.  I might put a
      read trace to simply supersede it's current value.  
      
         trace variable date r ResetDate
      
      I'm guessing that's why nobody ever's complained about
      the inconsistency before.
      
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  6. Ticket change [8bd1aa0cf7] (rid 127640) by dkf on 2003-06-26 17:34:20:

    1. subsystem changed to: "46. Traces"
  7. Ticket change [e9902099a0] (rid 104835) by dgp on 2003-06-26 23:07:56:

    1. assignee changed to: "dgp"
  8. Ticket change [03c402568f] (rid 119879) by dkf on 2003-06-27 15:27:38:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      You might want a trace on a variable you append to if the
      variable value was something that was somehow shared between
      interpreters that communicate across, say, a network
      connection.  Debugging is another obvious application.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"