Article View: de.comp.lang.c++
Article #110Re: Is the STL too authentic... ?
From: Kennel
Date: Tue, 10 Oct 1995 19:01
Date: Tue, 10 Oct 1995 19:01
43 lines
2403 bytes
2403 bytes
Andrew Koenig (ark@research.att.com) wrote: > In article <AC9FF58C96689D38@sleipner.nts.mh.se> lars.farm@nts.mh.se (Lars Farm) writes: > > >I'd rather agree with Andy Koenig: "run-time checking is a good thing > > >if you can afford it." This would suggest that the only time you turn > > >checking off is when profiling shows that you have a performance > > >problem due to run-time checking." > > Interesting. I got the impression he felt they were a good thing, but would > > impair performance too much to be required in the general case and I > > responded accordingly. > Full run-time checking is exceedingly expensive in C and C++, mostly > because of C's unconstrained pointers. Which is a potent reason to require some ability to perform checks in the newly-designed standard library components. This would work with existing compilers at low cost. Full run-time checking is very expensive to implement in C and C++, but one could say "if you use the STL in the right way then you'll get range checking and pointer checking while using them". It would further persuade people to move to this same library, which is desirable. So again, I think the specific nature of C++ (few pointer constraints and thus high cost for full checking) compared to other languages makes it even more disappointing that it was not addressed by the library committee. One could legitimately say that in, for exmaple Ada and Eiffel, one ought to leave checking as a compiler-implementation issue, knowing that the language design makes full checking much easier and that every implementation will do so to some degree. Which empirically is indeed the case. > -- > --Andrew Koenig > ark@research.att.com cheers matt kennel@msr.epm.ornl.gov
Technical Details
Message-ID:
<45eftu$u7@stc06.ctd.ornl.gov>Path:
arc1-ca.pugleaf.net!stc06.ctd.ornl.gov!mbkReferences:
<DFxJ75.3w0@research.att.com> <KANZE.95Oct9140029@slsvgqt.lts.sel.alcatel.de> <AC9FF58C96689D38@sleipner.nts.mh.se> <DG8Fpy.8u6@research.att.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!stc06.ctd.ornl.gov!mbk From: mbk@jt3ws1.etd.ornl.gov (Kennel) Newsgroups: de.comp.lang.c++,comp.lang.c++ Subject: Re: Is the STL too authentic... ? Followup-To: de.comp.lang.c++,comp.lang.c++ Date: 10 Oct 1995 19:01:18 GMT Organization: Oak Ridge National Lab, Oak Ridge, TN Message-ID: <45eftu$u7@stc06.ctd.ornl.gov> References: <DFxJ75.3w0@research.att.com> <KANZE.95Oct9140029@slsvgqt.lts.sel.alcatel.de> <AC9FF58C96689D38@sleipner.nts.mh.se> <DG8Fpy.8u6@research.att.com> Reply-To: kennel@msr.epm.ornl.gov NNTP-Posting-Host: jt3ws1.etd.ornl.gov X-Newsreader: TIN [version 1.2 PL2]