On Wed, Apr 5, 2017 at 11:00 AM, Edward K. Ream <[email protected]> wrote:
This is an Engineering Notebook post. Feel free to ignore unless you are a > dev. > > This post describes another surprising rabbit hole associated with > recursive imports. > Thinking about this in the shower I realized that all the troubles arose from the desire to eliminate duplicate code. But some of the code couldn't be duplicated, so I added keyword args to ic.createOutline. These keyword args are the culprits behind the wretched "if" statements. The new plan is for all callers of ic.createOutline to set up the root node for the import, and then call a simper version of ic.createOutline, say, ic.importIntoNode. This has a good chance of working. All experiments will be done in the new "imports" branch. In general, eliminating common code can be a good idea or a miserable one. Each new switch is a step towards miserable, so constant re-evaluation is a good idea. In practice, however, this re-evaluation only happens when the code becomes unbearably hard to change :-) Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
