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=-1.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HEADER_SPAM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc772,b30bd69fa8f63cb2 X-Google-Attributes: gidfc772,public X-Google-Thread: 103376,b30bd69fa8f63cb2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-11 03:08:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!logbridge.uoregon.edu!uwm.edu!rpi!not-for-mail From: James Rogers Newsgroups: comp.lang.ada,comp.lang.c++.moderated Subject: Re: C bug of the day Date: 11 Jun 2003 06:10:22 -0400 Organization: AT&T Worldnet 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: Wed, 11 Jun 2003 00:42:50 GMT X-Submission-Address: c++-submit@netlab.cs.rpi.edu X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated iQBVAwUAPucACkHMCo9UcraBAQHIWgH/a4ClNAVsbLMaUAGkkZ290GMn3ZV64Oeg +XSNCp2mz0QdM1GZiTbPLBQ4tx8o8IifhVycHSFyG87MK/K0dapX8g== =U6KI Xref: archiver1.google.com comp.lang.ada:38962 comp.lang.c++.moderated:68136 Date: 2003-06-11T06:10:22-04:00 List-Id: kanze@gabi-soft.fr wrote in news:d6652001.0306100323.338a2a1c@posting.google.com: > 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. > Since this was cross-posted to comp.lang.ada I think it is fair to mention that there is a language that meets your description above. That language is Ada. Its defaults are fundamentally safe. It provides the ability to override the safety constraints whenever you choose to. Note how Ada differs from Java. You cannot turn off array bounds checking for Java. In Ada you can. In fact, many Ada compilers will optimize out bounds checking when they can determine the checks are unnecessary. In other words, you can arrive at the same level of safety which is the default for C++. With Ada, however, you need to remove safety checks to get there. Manually removing safety checks is not usually needed for performance reasons. Most programmers will use a language in the manner which requires minimum effort. This is why safety checks are not terribly common in C++. It is also why manually turning off safety checks is not terribly common in Ada. Jim Rogers [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ] [ about comp.lang.c++.moderated. First time posters: do this! ]