home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 17929 < prev    next >
Encoding:
Text File  |  1992-12-14  |  2.2 KB  |  55 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!mole-end!mat
  3. From: mat@mole-end.matawan.nj.us
  4. Subject: Re: Need help implementic data structures of generic objects
  5. Message-ID: <1992Dec13.141400.5307@mole-end.matawan.nj.us>
  6. Summary: New Lamps for Old, New Hacks for Old
  7. Organization: :
  8. References: <1992Dec8.165230.2587@ucc.su.OZ.AU> <42186@sdcc12.ucsd.edu> <1992Dec11.233253.27540@informix.com>
  9. Date: Sun, 13 Dec 1992 14:14:00 GMT
  10. Lines: 43
  11.  
  12. In article <1992Dec11.233253.27540@informix.com>, cshaver@informix.com (Craig Shaver) writes:
  13. > In article <1992Dec10.114636.16861@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
  14. > >In article <42186@sdcc12.ucsd.edu> cs161feu@sdcc10.ucsd.edu (Anthony Minkoff) writes:
  15. > >>Hi.  Another question from a C++ neophyte.
  16. > ....
  17. > >>The approach that has been
  18. > >>suggested is:
  19.  
  20. > >>class Object {
  21. > >>    /* ...etc... */
  22. > >>};
  23.  
  24. > >    Dont do this Smalltalk hack please. A queue of Objects is
  25. > >totally useless, since they are just Objects and not ever Widgets.
  26.  
  27. > YES! Do that elegant Smalltalk thing.  Do not listen to C++ hacks and
  28. > bigots.  Put a little thought into it and do something (re)useful.
  29.  
  30. If you are programming in Smalltalk then by all means use the same
  31. language construct for inheritance as for genericity.  But if you
  32. are programming in C++, use the right tool: a template.
  33.  
  34. The template should describe the nature of a collection; the template
  35. should be instantiated for the type of the thing being collected.
  36. With the exception of collections of things to freeze and thaw and
  37. a few like problems, there are no truly heterogenous lists in problems.
  38. You are collecting objects because you are going to gurklemont them;
  39. then you have a list of gurklemont'ables, NOT a list of wholly anonymous
  40. Objects.
  41.  
  42. When in Smalltalk, Talk Small.  When in C++, think clearly and write
  43. clearly.  True elegance means using a thing well as designed.
  44.  
  45. ``We got elegance!  If you ain't got elegance, you can never, ever,
  46. carry it off.''  --From ``Hello, Dolly''
  47.  
  48. ``To use the language well, do not begin by hacking it to bits.''
  49.                     --Strunk and White
  50. -- 
  51.  (This man's opinions are his own.)
  52.  From mole-end                Mark Terribile
  53.  
  54.  mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
  55.