Re: Booch's book feels too philosophical rather than practical?



Robert Martin wrote:
On 2007-01-21 21:59:31 -0600, "topmind" <topmind@xxxxxxxxxxxxxxxx> said:

Using the overused "shape" examples, you have two "lists": lists of
shapes and lists of operations on those shapes. If you factor out the
duplication of one list you introduce duplication of another. OO'ers
don't bother to count the repeated method list as "duplication" because
they are brainwashed to ignore such duplication.

There are indeed two lists. OO does not deny this, it takes advantage of it.

Procedural programming allows you to add new functions without changing
the existing data structures. OO allows you to add new data structures
without changing the existing functions. You need both capabilities.

You mean adding functions and "subtypes" without changing existing
code? There are table-driven ways to do such and even file-driven ways.
It is just meta-tizing functions and structures. I don't find a
practical need for such very often in biz apps, though.

But you forgot to mention another change pattern: loss of mutual
exclusiveness. If 2+ options change to no longer be mutually exclusive,
then procedural fairs better. It is a smaller change: just change the
CASE to IF statements. With polymorphism you have to move code to
different named modules, and I give that a much higher change cost
score.


--
Robert C. Martin (Uncle Bob) | email: unclebob@xxxxxxxxxxxxxxxx

-T-

.



Relevant Pages

  • Re: Running Count/Sum in a form
    ... sub-query will pump all the tuples. ... you manually want to spot any difference between two ordered lists. ... >> You need an ordering field, or group of fields, without duplication, ... The subquery approach is ...
    (microsoft.public.access.formscoding)
  • Re: A Logical Model for Lists as Relations
    ... > with a rank per any explicit order, I am not even sure the ordinal ... If one has a numeric index that differs for each tuple, one never has duplication. ... In the end, though, I'm confident that the lists MS desires can be ...
    (comp.databases.theory)
  • Re: A Logical Model for Lists as Relations
    ... > with a rank per any explicit order, I am not even sure the ordinal ... If one has a numeric index that differs for each tuple, one never has duplication. ... lists provide nothing more than relations do ...
    (comp.databases.theory)
  • Re: Boochs book feels too philosophical rather than practical?
    ... shapes and lists of operations on those shapes. ... duplication of one list you introduce duplication of another. ... Procedural programming allows you to add new functions without changing the existing data structures. ...
    (comp.object)
  • Re: OO is the new Go-To (was: Biz Tree Challenge)
    ... Robert Martin wrote: ... Only 1 thru 3 directly remove duplication IIRC. ... existing data structures without changing the data structures. ... We present tools for dealing with ALL change scenarios. ...
    (comp.object)