home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!enterpoop.mit.edu!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: feedback wanted on appropriate OOPL
- Date: 11 Jan 93 01:07:38
- Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
- Perceptive)
- Lines: 36
- Message-ID: <TMB.93Jan11010738@arolla.idiap.ch>
- References: <726278910snx@trmphrst.demon.co.uk> <rmartin.726674455@thor>
- <TMB.93Jan10170408@arolla.idiap.ch> <1993Jan10.220917.22879@netcom.com>
- Reply-To: tmb@idiap.ch
- NNTP-Posting-Host: arolla.idiap.ch
- In-reply-to: erc@netcom.com's message of Sun, 10 Jan 1993 22:09:17 GMT
-
- In article <1993Jan10.220917.22879@netcom.com> erc@netcom.com (Eric Smith) writes:
- >In article <TMB.93Jan10170408@arolla.idiap.ch> tmb@idiap.ch writes:
- >>It is only true to say that _at compile time_, C++ will catch more
- >>programmer errors than Smalltalk.
- >>
- >>If you take into account both compile time and runtime, Smalltalk will
- >>catch more "programmer errors" than C++: not only will Smalltalk catch
- >
- >But when is runtime? When the program starts running, or when it
- >encounters unusual data several years after it's put into production?
- >
- >The advantage of compile time error detection is that all the errors
- >that can be caught by the compiler are caught before the program is
- >released.
-
- Detecting errors at compile time is better than detecting them
- at runtime. But detecting errors at runtime is better than not
- detecting them at all.
-
- Unfortunately, the majority of errors that are detectable at all can
- only be detected at runtime. C++ has no support for runtime error
- checking, and C++ programmers leave out most of those checks (many
- couldn't be coded efficiently in user code anyway). That makes
- C++ programs relatively untrustworthy, but gives everybody the
- illusion that C++ is a "fast" language.
-
- I believe that safety will become of paramount importance in software
- over the next decade. C++ will either adapt by mandating more runtime
- checks (integer overflow, pointer checks, garbage collection), or
- other languages will take over its niche. But even if C++ adapts, it
- is still at a disadvantage, since it seems that many runtime safety
- features are more expensive to provide in C++ in a way that is
- compatible with C++ than in other languages that aren't hampered
- by backwards compatibility.
-
- Thomas.
-