home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / std / cplus / 2017 < prev    next >
Encoding:
Text File  |  1993-01-09  |  1.2 KB  |  33 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!taumet!steve
  3. From: steve@taumet.com (Steve Clamage)
  4. Subject: Re: Use of nested functions (Was: Proposal for default scope)
  5. Message-ID: <1993Jan9.173310.13214@taumet.com>
  6. Organization: TauMetric Corporation
  7. References: <9300817.11209@mulga.cs.mu.OZ.AU> <1993Jan8.192906.2342@qualcomm.com>
  8. Date: Sat, 9 Jan 1993 17:33:10 GMT
  9. Lines: 22
  10.  
  11. greg@qualcom.qualcomm.com (Greg Noel) writes:
  12.  
  13. >The ``Spirit of C'' is that expensive things are exposed to
  14. >the programmer; C++ inherits much of this spirit.
  15.  
  16. I have to disagree with this point.  C++ hides a lot of grungy detail
  17. from the programmer, with the consequence that simple constructs may
  18. require a lot of compiler-generated code.
  19.  
  20. Example 1:  A class in a multiply-inherited hierarchy with virtual base
  21. classes and virtual functions winds up with a very large and complicated
  22. constructor, even if all the constructors for all the classes have
  23. very simple bodies.
  24.  
  25. Example 2:  User types, with code hidden in a library, may require very
  26. complicated runtime routines.  The very simple expression
  27.     a + b
  28. might invoke enormous amounts of calculation, memory management, and
  29. even file access.
  30. -- 
  31.  
  32. Steve Clamage, TauMetric Corp, steve@taumet.com
  33.