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

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!mole-end!mat
  3. From: mat@mole-end.matawan.nj.us
  4. Subject: Re: Give me safe C++
  5. Message-ID: <1992Dec14.190553.14838@mole-end.matawan.nj.us>
  6. Summary: The _right_ amount of flexibility ...
  7. Organization: :
  8. References: <9234501.15945@mulga.cs.mu.OZ.AU> <Bz2nDF.7B6@fiu.edu> <1992Dec12.145403.26483@ucc.su.OZ.AU>
  9. Date: Mon, 14 Dec 1992 19:05:53 GMT
  10. Lines: 44
  11.  
  12. In article <1992Dec12.145403.26483@ucc.su.OZ.AU>, maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
  13. > In article <WARSAW.92Dec11124441@anthem.nlm.nih.gov> warsaw@nlm.nih.gov (Barry A. Warsaw) writes:
  14.  
  15. > >>>>>> "Michael" == Michael Feathers <feathers@serss0> writes:
  16.  
  17. > >    Michael> ... I think that C and C++ are versatile languages precisely
  18. > >    Michael> because no one ever tried to limit their functionality
  19. > >    Michael> with good intentions.
  20.  
  21. > >Agreed. IMHO, the real power of C++ as a development language is the
  22. > >ability to easily climb up and down the abstraction ladder depending
  23. > >on the context of the problem.  Sometimes you need to mingle with the
  24. > >bits in the basement, sometimes you just need ADTs and sometimes you
  25. > >really want to do OOP.  ...
  26.  
  27. >     And I think you tend to miss exactly where rigid restrictions on
  28. > functionality are the things which *yield* the very power you desire. ...
  29. > Function pointers ... are ... more powerful ... than mere virtual functions. 
  30.  
  31. >     What makes virtual functions so useful is the fact that they
  32. > are so tightly restricted .. for example, unlike a genuine
  33. > function pointer they cannot be modified after object creation, ...
  34.  ...
  35. >     So when language designers propose restrictions, one must
  36. > carefully weigh up the pros and cons: most restrictions also
  37. > grant freedom.  ...
  38.  
  39. Absolutely.  But some languages would give you the virtual functions and
  40. take away the function pointers!
  41.  
  42. The point is, I think, having the right tools for the job at hand.  Your
  43. high-level tools should be good enough that you'll never think of using
  44. anything else for a job they can do.  But when they can't do the job--or
  45. more likely, a small part of the job--you shouldn't have to forsake your
  46. high-level tools entirely as a punishment for once using a down-and-dirty
  47. approach.
  48.  
  49. And  _that_ , I think, is one of great virtues of C++.  Whether you think
  50. of it as `seamless' or just forgiving, it's there.
  51. -- 
  52.  (This man's opinions are his own.)
  53.  From mole-end                Mark Terribile
  54.  
  55.  mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
  56.