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

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!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: feedback wanted on appropriate OOPL
  5. Message-ID: <TMB.93Jan12173358@arolla.idiap.ch>
  6. Date: 13 Jan 93 01:33:58 GMT
  7. References: <726278910snx@trmphrst.demon.co.uk> <rmartin.726674455@thor>
  8.     <TMB.93Jan10170408@arolla.idiap.ch> <1993Jan10.220917.22879@netcom.com>
  9.     <TMB.93Jan11010738@arolla.idiap.ch> <rmartin.726795534@thor>
  10. Reply-To: tmb@idiap.ch
  11. Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
  12.     Perceptive)
  13. Lines: 29
  14. NNTP-Posting-Host: arolla.idiap.ch
  15. In-reply-to: rmartin@thor.Rational.COM's message of Mon, 11 Jan 1993 23:38:54 GMT
  16.  
  17. In article <rmartin.726795534@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  18.  
  19.    |C++ will either adapt by mandating more runtime
  20.    |checks (integer overflow, pointer checks, garbage collection),
  21.  
  22.    Probably through the agency of class libraries which provide these
  23.    runtime checks transparently.
  24.  
  25.    Certainly vector bounds checking and arithmetic exception testing can
  26.    all be encapsulated within classes.
  27.  
  28. Sure they can. However...
  29.  
  30.    This I doubt.  I think it is more that some runtime features are
  31.    expensive, period.  Languages that support them, have made a different
  32.    tradeoff than that made in C++, and have sacrificed something else
  33.    (probably speed) thereby.
  34.  
  35.  ... if you do a little experimentation, I'm sure you'll find, as
  36. others have, that providing arithmetic exceptions, array bounds
  37. checking, and garbage collection "encapsulated in classes" is much
  38. less efficient than if they are compiler built-ins (not to mention
  39. issues of compatibility and portability).
  40.  
  41. That is, in C++, you get "unsafe, but fast", and "safe, but slow". You
  42. don't get "safe, but moderately fast", which is what I think most
  43. people care about.
  44.  
  45.                     Thomas.
  46.