home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18973 < prev    next >
Encoding:
Text File  |  1993-01-11  |  2.6 KB  |  74 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!rational.com!thor!rmartin
  3. From: rmartin@thor.Rational.COM (Bob Martin)
  4. Subject: Re: feedback wanted on appropriate OOPL
  5. Message-ID: <rmartin.726795534@thor>
  6. Sender: news@rational.com
  7. Organization: Rational
  8. References: <726278910snx@trmphrst.demon.co.uk> <rmartin.726674455@thor>     <TMB.93Jan10170408@arolla.idiap.ch> <1993Jan10.220917.22879@netcom.com> <TMB.93Jan11010738@arolla.idiap.ch>
  9. Date: Mon, 11 Jan 1993 23:38:54 GMT
  10. Lines: 62
  11.  
  12. tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
  13.  
  14. |Detecting errors at compile time is better than detecting them
  15. |at runtime. But detecting errors at runtime is better than not
  16. |detecting them at all.
  17.  
  18. |Unfortunately, the majority of errors that are detectable at all can
  19. |only be detected at runtime.
  20.  
  21. I disagree with this statement.  In my experience, the majority of
  22. detectable errors, are detected in the compilation phase (and in the
  23. code review phase of course).
  24.  
  25. | C++ has no support for runtime error
  26. |checking, 
  27.  
  28. Although there are common environments that provide it.
  29.  
  30. |and C++ programmers leave out most of those checks (many
  31. |couldn't be coded efficiently in user code anyway). That makes
  32. |C++ programs relatively untrustworthy, but gives everybody the
  33. |illusion that C++ is a "fast" language.
  34.  
  35. I don't think the speed is an illusion.  Nor do I agree that C++
  36. programs are necessarily less trustworthy than stalk programs.
  37.  
  38. |I believe that safety will become of paramount importance in software
  39. |over the next decade. 
  40.  
  41. I am in wholehearted, enthusiastic agreement. 
  42.  
  43. |C++ will either adapt by mandating more runtime
  44. |checks (integer overflow, pointer checks, garbage collection),
  45.  
  46. Probably through the agency of class libraries which provide these
  47. runtime checks transparently.
  48.  
  49. Certainly vector bounds checking and arithmetic exception testing can
  50. all be encapsulated within classes.  
  51.  
  52. |or
  53. |other languages will take over its niche. 
  54.  
  55. This is inevitable, but probably not soon.
  56.  
  57. |But even if C++ adapts, it
  58. |is still at a disadvantage, since it seems that many runtime safety
  59. |features are more expensive to provide in C++ in a way that is
  60. |compatible with C++ than in other languages that aren't hampered
  61. |by backwards compatibility.
  62.  
  63. This I doubt.  I think it is more that some runtime features are
  64. expensive, period.  Languages that support them, have made a different
  65. tradeoff than that made in C++, and have sacrificed something else
  66. (probably speed) thereby.
  67.  
  68.  
  69. --
  70. Robert Martin                        Training courses offered in:
  71. R. C. M. Consulting                       Object Oriented Analysis
  72. 2080 Cranbrook Rd.                        Object Oriented Design
  73. Green Oaks, Il 60048 (708) 918-1004       C++
  74.