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