At present, Leo represents the information in @mode nodes as "overloaded" dicts, with particular keys (with names staring with '*') having special-purpose meanings.
This is quite possibly the worst anti-pattern I have ever used. It makes the code almost unreadable, and introduces horrendous special- case code everywhere. This is brain-dead code. Instead of overloaded dicts, Leo should use instances of a new class, say ModeOptions. The special-case dictionary keys will become ivars. Special-case code either disappears or becomes references to ivars. The new class will also provide the proper place for improved checks and dumps. Doh! This is all standard OO theory. What's interesting is how it ties in with the idea that we know, or *should* know, the types of the objects in our programs. Of course, OO theory says that it is (sometimes) valid to ignore the differences between classes and their subclasses, but that's pretty much another matter. Anyway, I'll remember this anti-pattern for the rest of my life. It instantly creates the chaos found in assembly language programs. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
