Artifacts Associated With Ticket 433252
Ticket change [7246563d7d] (rid 100828) by msofer on 2001-06-14 21:44:52:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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 - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "msofer"
- subsystem initialized to: "07. Variables"
- title initialized to: "Better coherence in traces"
- type initialized to: "RFE"
Ticket change [03c0375097] (rid 119875) by msofer on 2001-06-15 05:00:22:
- icomment:
Logged In: YES user_id=148712 Forgot one: [info exists x] does not really read the value, but the read trace is fired ...
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [afa38770b7] (rid 97852) by fbonnet on 2001-06-18 14:39:51:
- 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
- login: "fbonnet"
- mimetype: "text/plain"
- username: "fbonnet"
- icomment:
Ticket change [880c39a367] (rid 131802) by welch on 2001-06-21 11:02:48:
- 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.
- login: "welch"
- mimetype: "text/plain"
- username: "welch"
- icomment:
Ticket change [07efb42ba5] (rid 89489) by nobody on 2001-06-23 00:01:11:
- 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.
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [8bd1aa0cf7] (rid 127640) by dkf on 2003-06-26 17:34:20:
- subsystem changed to: "46. Traces"
Ticket change [e9902099a0] (rid 104835) by dgp on 2003-06-26 23:07:56:
- assignee changed to: "dgp"
Ticket change [03c402568f] (rid 119879) by dkf on 2003-06-27 15:27:38:
- 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.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment: