Skip to content
Tcl Source Code Artifact [98bda24c71]
Login

Artifact [98bda24c71]

Artifact 98bda24c71d61848caefe8a50c027556e688ee14:

Ticket change [98bda24c71] - Closed ticket [bb6108bb671bb697|bb6108bb67]: <i>Array tracing not as documented</i> plus 7 other changes by dkf on 2016-08-20 16:22:15.
D 2016-08-20T16:22:15.690
J closedate 2457621.18212604
J closer dkf
J icomment There's\sa\sfairly\scomplex\sset\sof\sinternal\sstates,\sbut\sarrays\sexist\sindependently\sof\stheir\scontents.\sFurthermore,\sit's\spossible\sfor\sa\svariable\sto\sexist\sbut\sbe\sreported\s(e.g.,\sby\s<code>info\sexists</code>)\sas\snot\sexisting;\sthat\stypically\smeans\sthat\seither\sthere's\sa\strace\skeeping\sthe\sstorage\salive\sor\sthat\sthere's\san\s<code>upvar</code>-link\spointing\sto\sit.\sIt'll\sget\sreaped\sonce\sthere's\sno\smore\sreferences\sto\sit\son\sthe\sC\sside,\sor\sit'll\shave\ssomething\sput\sinto\sit\sand\sbecome\spersistent\s(until\sit\sis\sdeleted\sor\shas\sits\sowning\scontext\sdestroyed).\r\n\r\nHowever,\sonce\syou\sstart\susing\smultiple\sarray-level\straces\sthat\smodify\sthe\sarray\son\sread,\smy\sability\sto\sfigure\sout\ssanity\sgets\sstrained.\sTraces\snever\srun\swhile\sthey\sare\salready\srunning,\sbut\sone\strace\scan\scause\sanother\sto\srun.\sMoreover,\s<code>array\sget</code>\striggers\straces\sin\stwo\sphases,\sonce\sto\sallow\sthe\sset\sof\skeys\sto\sbe\scorrect\s(used\sto\smake\s<code>::env</code>\swork\sright)\sand\sagain\swhen\sthe\sindividual\selements\sare\sread\s(and\sfailures\sto\sread\sthe\svariable\sthere\scause\sthe\skey\sto\sbe\somitted\sfrom\sthe\sresult).\sIt\sdoesn't\sdetect\skeys\sadded\swhile\sit\sis\srunning\ssince\sthat\smight\swell\scause\sall\ssorts\sof\sflapping.\r\n\r\nIt's\sprobably\snot\sa\sgood\sidea\sto\sput\sa\sreading-trace\son\san\sarray\swhen\sthere's\sanother\sreading\strace\sthat\sdoes\sa\sread\son\sthe\sarray.\sIn\sfact,\sdon't\sdo\sthat.\sDo\sconsider\susing\s<code>trace\sadd\svariable\sy\sarray</code>\sas\swell\sfor\ssetting\sthe\s<code>foo</code>\selement.\sThat\sruns\sat\sa\stime\s<i>before</i>\sthe\slist\sof\skeys\sis\sconstructed.\r\n\r\nI\swon't\sfix\sanything\shere.\sWhat\swe've\sgot\sis\sprobably\sas\sgood\sas\sis\spractical.
J login dkf
J mimetype text/x-fossil-wiki
J resolution Wont\sFix
J status Closed
J username dkf
K bb6108bb671bb697f10466325e4e9c612831b544
U dkf
Z 3ab1cbdacebee0c7724b021122c97485