home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 18120 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  1.8 KB

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