From: Donal K. F. <don...@ma...> - 2012-11-23 11:28:27
|
On 23/11/2012 08:31, Trevor Davel (Twylite) wrote: > On 2012/11/23 10:02 AM, Donald Arseneau wrote: >> although [upvar 2] occurs occasionally (meaning i used it once). > > [upvar 2] appears to be used in: > tcllib/modules/bench/bench.tcl > tcllib/modules/rest/rest.tcl > tcllib/modules/struct/pool.tcl > tcllib/modules/struct/tree_tcl.tcl > tcllib/modules/tepam/tepam.tcl > tcllib/modules/yaml/huddle.tcl > > [upvar 3] appears to be used in: > tcllib/modules/page/util_flow.tcl > tcllib/modules/tie/tie_array.tcl > tablelist/scripts/tablelistWidget.tcl > > [upvar 5] appears to be used in: > tcllib/fileutil/multiop.tcl I'm not saying that they don't occur. Just that they're really supremely unwise or an indication of poor choice of refactoring points. ([upvar 5]? There are really three controlled levels between the user's code and the point where the library wants the variable? Isn't that excessively baroque?) Donal (I have written such things; I regretted it later). |