Overview
| Artifact ID: | dae29ad7af066240435b584a7f5cc64fc99bc0149fa3846313e54d65539f4fc9 |
|---|---|
| Ticket: | 90657479e8f2a76c6603726c25c03a3582402ad8
code review [2201fdb82c] |
| User & Date: | dkf on 2017-12-11 23:02:10 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/html"
- comment changed to:
<ol> <li>What is the change to tclBasic.c doing in there? <li>The RemoveItem macro probably ought to be written like this: <pre> #define RemoveItem(type, lst, i) \ do { \ Remove ## type ((lst).list, (lst).num, i); \ (lst).num--; \ } while (0) </pre> It's a standard transform that defangs the worst of syntactic games that C can throw at you. <li>The changes to use TclNRCreateCommandInNs instead of directly making the <tt>my</tt> command <i>must</i> be performance-profiled. It's because of performance profiling that the weird direct method was used at all; that code is hot-path for object instantiation and we want to try to avoid slowing that down. <li>I like that it looks like some simplifications have been possible in the deletion code. I really really wish that I could be certain that they were correct from just inspection. There's a great many ways an object can get deleted, such as by its destroy method, by <tt>rename</tt>, by having its namespace wiped out, by having its interpreter destroyed, and by having its class or mixins destroyed. And maybe others. <li>Re the comment: <blockquote><tt>To do: Get dkf to weigh in on wether this should be protected with a !IsRoot() condition.</tt></blockquote> the issue is that oo::object and oo::class point mutually at each other (and are the <i>only</i> pair of classes where this is legal). Care must be taken to ensure that the specialness is not undone by accident and the usual consequences of trying probably should be either a “computer says no!” or an orderly delete of the whole of TclOO. <li>The change to tclOOBasic.c is wrong; the destroy method should be ensuring that no extra arguments are passed, as it is documented to not take extra args. <li>I'm not sure about the changes to the FOREACH macro; it was intended to be a simple iterator rather than providing those extra skip-NULL-entry capabilities, so adding extra checking such as you do runs the risk of introducing hazards. </ol> - foundin changed to: "2201fdb82c"
- is_private changed to: "0"
- login: "dkf"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "dkf"
- subsystem changed to: "35. TclOO Package"
- title changed to: "code review [2201fdb82c]"
- type changed to: "Bug"