home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!warwick!uknet!glasgow!unix.brighton.ac.uk!je
- From: je@unix.brighton.ac.uk (John English)
- Newsgroups: comp.lang.c++
- Subject: Re: Need help implementic data structures of generic objects
- Message-ID: <1992Dec17.104357.3422@unix.brighton.ac.uk>
- Date: 17 Dec 92 10:43:57 GMT
- References: <1992Dec13.002551.778@informix.com>
- Organization: University of Brighton, UK
- Lines: 30
-
- cshaver@informix.com (Craig Shaver) writes:
- : It is obvious to me that you have a virtual function in the base class for
- : all functions that you need to use when dealing with 'Objects'.
- :
- : If you use a function on a class that is only restricted to a certain
- : sub-tree of your inheritance structure, then you know what you are using,
- : ergo, you should have used that type instead of 'Object'.
-
- Yes, but then you end up migrating a lot of the functionality of your
- hierarchy into class Object, in much the same way as widely-used data
- structures end up being global in C.
-
- : IMHO, if you do not use inheritance, you are not doing OOP. If you do
- : not care, then you are just using C++ as a variation on C with no real
- : benefit.
-
- Not use inheritance? who said dat? Just don't follow the Smalltalk model,
- use multiple inheritance instead of an omnipresent Object class.
-
- : If I offended anyone that is just tough.
-
- Don't give it another thought :-)
- --
- -------------------------------------------------------------------------------
- John English | Fudd's first law of opposition:
- Dept. of Computing | If you push something hard enough, it
- University of Brighton | *will* fall over.
- E-mail: je@unix.brighton.ac.uk | Testlicle's deviant to Fudd's law:
- Fax: 0273 642405 | What goes in, must come out.
- -------------------------------------------------------------------------------
-