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

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!pacbell!oracle!pyramid!infmx!cshaver
  2. From: cshaver@informix.com (Craig Shaver)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Should I use a generic object which all others inherit from
  5. Message-ID: <1992Nov17.190821.18348@informix.com>
  6. Date: 17 Nov 92 19:08:21 GMT
  7. References: <3762@news.cerf.net>
  8. Sender: news@informix.com (Usenet News)
  9. Organization: Informix Software, Inc.
  10. Lines: 37
  11.  
  12. In article <3762@news.cerf.net> hlf@nic.cerf.net (Howard Ferguson) writes:
  13. >I am working on the early stages of design on an embedded C++
  14. >project. One of the decisions which we will have to make in the
  15. >near future is whether to make all of the objects inherit from 
  16. >onie generic object at the top of the tree or to go for the forest 
  17. >approach. 
  18. >
  19. .................
  20. >
  21. >
  22. >        Many thanks,
  23. >            hlf
  24.  
  25. An embedded system!  C++!?  JUST USE C!!!!
  26.  
  27. UNLESS ....
  28.  
  29. You have some of the benefits of OOP in mind, such as inheritance, reuse, 
  30. and information hiding.  Then if you are willing to take small dings in
  31. performance go all the way and use the tree approach as pioneered by
  32. Smalltalk.  I recently saw a review of the toy code that comes with the
  33. borland compiler.  The article's author commented that the tree type
  34. libraries were "passe" because of templates.  What a stupid thing to say!
  35.  
  36. One of the big wins of OOP is reuse.  By using an inheritance structure
  37. you can reuse existing code and do incremental development.  Related and
  38. unrelated classes can be used in the same context where a similar protocol
  39. is enforced.  
  40.  
  41. I have to think some of the people involved with C++ have no idea what the
  42. basis of OOP really is.  They are simply using C++ as an improved C.
  43.  
  44. Craig ...
  45.  
  46. -- 
  47. Craig Shaver  (cshaver@informix.com for now) (415)390-0654 (415)926-6407
  48. Productivity Group POB 60458 Sunnyvale, CA  94088
  49.