home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!olivea!mintaka.lcs.mit.edu!ai-lab!life.ai.mit.edu!tmb
- From: tmb@arolla.idiap.ch (Thomas M. Breuel)
- Newsgroups: comp.lang.c++
- Subject: Re: Pros and cons of C++
- Message-ID: <TMB.93Jan8152439@arolla.idiap.ch>
- Date: 8 Jan 93 23:24:39 GMT
- References: <C0Hp1n.vp@gpu.utcs.utoronto.ca> <TMB.93Jan7174627@arolla.idiap.ch>
- <79416@hydra.gatech.EDU>
- Reply-To: tmb@idiap.ch
- Followup-To: comp.lang.c++
- Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
- Perceptive)
- Lines: 38
- NNTP-Posting-Host: arolla.idiap.ch
- In-reply-to: mhopper@emperor.gatech.edu's message of 7 Jan 93 20:15:36 GMT
-
- In article <79416@hydra.gatech.EDU> mhopper@emperor.gatech.edu (Michael A. Hopper) writes:
-
- In article <TMB.93Jan7174627@arolla.idiap.ch> tmb@idiap.ch writes:
-
- [Hopper conveniently deleted the part where I talk about efficiency
- and what I like about C++]
-
- >What do I dislike about C++?
- >[several points deleted]
-
- It's important to remember that many trade-offs were chosen for C++
- for the sake of PERFORMANCE. This addresses points 2 [no pointer
- safety] and 5 [no garbage collection] above.
-
- You also need to be aware that many of the design decisions behind C++
- are driven by backwards compatibility, not by performance
- considerations alone. C++ does not attempt to optimize performance
- (even at the expense of safety), it attempts to optmize performance
- while remaining C compatible.
-
- In particular, if you design a language from scratch, supporting
- pointer safety does not cost you very much. If you are designing a
- language from scratch, supporting garbage collection will often give
- you better performance than C++-style manual storage management (I
- have posted several benchmarks supporting this claim to comp.lang.c++
- in the past).
-
- What makes those features costly in C++ is that they need to be
- backwards compatible with C. Backwards compatibility is C++'s greatest
- advantage over competing languages, but it is likely to be its
- eventual downfall. Safety and garbage collection and many of the
- other features that I mentioned, are features that many programmers
- want, and other languages will sooner or later catch on, languages
- that offer them without the (significant, though not devastating)
- overhead that would be associated with them you tried to support them
- in C++.
-
- Thomas.
-