On Mon, May 10, 2010 at 2:54 PM, Edward K. Ream <edream...@gmail.com> wrote:
> Encapsulation of complexity. I wrote the following in a reply to a post to this thread, before realizing it wasn't relevant there :-) But it still is worth saying: Imo, Leo has the proper abstractions for all modules, including the gui modules. I can say this with confidence for two reasons: 1. Each module (and every class in Leo, for that matter), does one clearly defined thing is "strong" in the sense that the class corresponds to a natural notion that has clear boundaries and actions. 2. Each module (and class) in Leo can, without *any* exception, be completely rewritten without affecting the rest of Leo in any significant way. This would simply not be true if modules and classes started to "know each others business". Of particular importance to Leo is leoKeys.py. It is absolutely essential that the complex key handling there (for command dispatch and autocompletion) *stay* there, and not be farmed out to the gui. As another example, leoFind.leo defines extremely complex logic for stepping through headlines and body text while spell checking and for find/replace operations. I tolerate significant complexity in the gui (wrapper classes) because that complexity maintains the essential feature of the design, namely the two encapsulation criteria mentioned above. In short, Leo's abstractions are extremely strong. Most suggestions for "improving" Leo's organization would make Leo much weaker. This is *the* essential thing to understand about Leo's design. I have not had to change Leo's modules in any significant way in almost 15 years, all the while adding major features and refactoring/rewriting key modules like leoNodes.py many times. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-edi...@googlegroups.com. To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.