From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,HEADER_SPAM, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,UTF8 X-Google-Thread: 103376,b30bd69fa8f63cb2 X-Google-Attributes: gid103376,public X-Google-Thread: fc772,b30bd69fa8f63cb2 X-Google-Attributes: gidfc772,public X-Google-ArrivalTime: 2003-06-10 06:18:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-pas-nf2!elnk-pas-nf1!newsfeed.earthlink.net!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!newsfeed.frii.net!newsfeed.frii.net!news-out.newsfeeds.com!propagator2-maxim!news-in.spamkiller.net!usc.edu!rpi!not-for-mail From: kanze@gabi-soft.fr Newsgroups: comp.lang.ada,comp.lang.c++.moderated Subject: Re: C bug of the day Date: 10 Jun 2003 09:20:25 -0400 Organization: http://groups.google.com/ Sender: cppmods@netlab.cs.rpi.edu Message-ID: References: <1054751321.434656@master.nyc.kbcfp.com> NNTP-Posting-Host: netlab.cs.rpi.edu X-Original-Date: 10 Jun 2003 04:23:42 -0700 X-Submission-Address: c++-submit@netlab.cs.rpi.edu X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated iQBVAwUAPuXbFUHMCo9UcraBAQH/0gIApEnMO+GOQcsLQyxFe4ByTFQJKzTuUcDF BcO77Gimel8ES1Zt5FDPDoAq5/Dc4IgSF5EI3fjSqvQiBD+k7oGu+Q== =T7TC Xref: archiver1.google.com comp.lang.ada:38900 comp.lang.c++.moderated:68084 Date: 2003-06-10T09:20:25-04:00 List-Id: brangdon@cix.co.uk (Dave Harris) wrote in message news:... > hyrosen@mail.com (Hyman Rosen) wrote (abridged): > > > Would you care to explain why "C++ is not safe because of > > > the STL"? > > He misphrased his English somewhat. He means that "just because C++ > > has the STL, that does not make it safe", alluding to the leagcy C > > stuff that is present. > Although the other meaning is true too. C++ is unsafe largely due to > undefined behaviour, and the STL has plenty of that. For example, > vec[-1]. Or resizing a container and invalidating an iterator:-). C++ is unsafe for any number of reasons. The STL just follows in the same old grand tradition. On the other hand, C++ gives the programmer an enormous freedom. Including the freedom to write very safe programs. I know of some other languages which make a lot of claims because one or two elements have a safer default (array accesses always bounds checked, for example), but which don't allow you any way of added to the safety built into the language. That doesn't mean C++ is perfect, of course. I'd rather have a language in which all of the defaults were fundamentally safe, but with the freedom to override them if you had special constraints, or even in cases where you came across a case which the language authors hadn't considered. I don't know such a language, however; it may exist somewhere, but if it does, it certainly isn't very popular or wide spread. -- James Kanze GABI Software mailto:kanze@gabi-soft.fr Conseils en informatique orientée objet/ Beratung in objektorientierter Datenverarbeitung 11 rue de Rambouillet, 78460 Chevreuse, France, Tél. : +33 (0)1 30 23 45 16 [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ] [ about comp.lang.c++.moderated. First time posters: do this! ]