home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sunic!corax.udac.uu.se!buzz.bmc.uu.se!perrier!sundvall
- From: sundvall@perrier.embnet.se (Mats Sundvall)
- Newsgroups: comp.lang.c++
- Subject: Re: Maximum reusability, was: C++ ..tree Inheritance ..
- Date: 21 Jan 1993 09:45:45 GMT
- Organization: EMBNet Project Sweden
- Lines: 39
- Distribution: world
- Message-ID: <1jlrc9INNq5m@buzz.bmc.uu.se>
- References: <1993Jan19.190743.1689@ucc.su.OZ.AU>
- Reply-To: sundvall@perrier.embnet.se
- NNTP-Posting-Host: perrier.embnet.se
-
-
- In article 1689@ucc.su.OZ.AU, maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
-
- >It is best in modular design to MINIMISE inheritance. It is
- >in general not a good thing. Although it supports reusability,
- >it does so with strong coupling (BAD) and without
- >explicit interfaces (BAD).
- >
- >Huge single inheritance heirarchies are the worst kind.
- >
- >Try using mixins. Lots of small independent abstracts,
- >some common syntheses of these abstractions,
- >and some common implementations of these abstractions.
- >
- >Also supply routines operating on the abstractions.
- >These will work what ever the implementation chosen
- >is, whether it be from the library or supplied
- >by the user.
- >
-
-
-
- I am not arguing about mixins but a problem I often encounter is when you need the
- same functionality in most or all of your classes. One example would be object I/O
- like in OODB's or if you want to stream objects to a file or across the net.
-
-
- The methods you need will end up in the mixin Object or PersBase or whatever you
- call it and voila, you have a huge tree.
-
-
- Please prove that I am wrong, I don't like it either!
-
-
- Mats Sundvall
-
- Uppsala University
- Sweden
-
-