9/7 I have a really difficult time reading this guy's OO code. Basically
he's utilizing polymorphic method calls, which is alright, but
tracing the code requires going back and forth between the deep
plethora super/child chains. While I like OO, I think this is just
a nightmare to trace and understand. Personally, I'd perfer a more
shallower chain of objects, extending OO via composition instead of
inheritance. What do you guys think?
\_ what if there were a tool where you could expand selected
parts and see the inherited methods all in one screen?
\_ I prefer composition to inheritance also, but conventional
wisdom on that subject is that inheritance is easier to
understand, though composition is more powerful.
Good development tools (as the above poster mentions) can also
help. Understanding code that traverses the inheritence heirarchy,
or accross many objects, is easy in Smalltalk (or VisualAge/Java)
where there are good tools available, but a pain in the ass
in emacs. OTOH, reading methods longer than 10 lines is obnoxious
in Smalltalk, where it is trivial in Emacs.
\_ i am starting to subscribe to the belief that only a few libraries
should be OO. widget toolkits, basic containers and a few other
things. applications should not define weird ass objects. they
should instead define function objects. |