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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!blackbush.cw.net!cw.net!feed.news.tiscali.de!news100.image.dk!news000.worldonline.dk.POSTED!not-for-mail From: "Peter Koch Larsen" Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> Subject: Re: [OT] Re: Teaching new tricks to an old dog (C++ -->Ada) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Message-ID: Date: Sat, 5 Mar 2005 23:33:11 +0100 NNTP-Posting-Host: 62.79.147.244 X-Complaints-To: news-abuse@wol.dk X-Trace: news000.worldonline.dk 1110061989 62.79.147.244 (Sat, 05 Mar 2005 23:33:09 MET) NNTP-Posting-Date: Sat, 05 Mar 2005 23:33:09 MET Organization: Customer of Tiscali A/S Xref: g2news1.google.com comp.lang.ada:8690 comp.lang.c++:44236 comp.realtime:974 comp.software-eng:4505 Date: 2005-03-05T23:33:11+01:00 List-Id: "Larry Kilgallen" skrev i en meddelelse news:zrCcaGBZQ9Cx@eisner.encompasserve.org... > In article <3SjWd.103128$Vf.3969241@news000.worldonline.dk>, "Peter Koch > Larsen" writes: > >>>> - You might end up making more mistakes with Ada because of >>>> inexperience with Ada. >>> >>> Wrong. I took that route 4 years ago, and found that the compiler >>> would catch all my stupid mistakes. When it comes to reliability, Ada >>> compilers are your friends; C++ compilers are your enemies. >> >> Out of curiosiy, could you give some few examples where Ada catches >> faults >> not found by a C++ compiler. I assume - of course - code written in >> modern >> C++: no casts, functions instead of macroes, a limited use of pointers >> and >> so on. > > Which C++ compilers prevent those practices deprecated in your second > sentence ? It is not a question of prevention. C++ allows you to do some really dangerous things - in my mind rightfully so. When you do program in C++ you must "constrain yourself" and not use the dangeous stuff - unless you need to do so, of course ;-) It's kind of like driving. You can get into a lot of trouble if you do not follow the traffic laws (you just have to obey the physicla ones ;-), but so long as you do driving is a fairly safe practice. /Peter