home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18837 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  2.3 KB

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