Re: Some errors in MIT's intro C++ course
On Sep 18, 12:51 pm, Christian Hackl <ha...@sbox.tugraz.at> wrote:
Juha Nieminen ha scritto:
(And even if you *are* compiling in debug mode, you are
still not *guaranteed* to get a crash because the standard
says so. Unless Microsoft and the gcc team have *promised*
that it will crash now and in the future for eternity, you
have no guarantee.)
You don't have to upgrade your compiler if you don't want to.
Removal of security features certainly sounds like a good
reason for keeping an old version.
Besides, who tells you that the ISO standard will leave bounds
checking optional "for eternity"? Perhaps it will be required
by C++2x, or perhaps at() will be removed.
Or perhaps std::vector will be removed entirely.
Seriously: at() will not be removed. And the standard will
never require checking, because it does have such serious
performance implications (not bounds checking per se, but all of
the iterator verifications), and they won't want to render a
compiler non-compliant when it is turned off.
Just as seriously, however: checking implementations are here to
stay, and no new implementation will be done without (optional)
checking. You don't go to the effort of implementing something
new just to make it inferior to the existing products.
(Practically speaking, I suspect that Dinkumware will end up
with a monopoly of the commercial implementations, simply
because the other commercial implementations are so far behind
it. And the two major non-commercial implementations: the one
with g++ and STLPort, both support debugging.)
--
James Kanze