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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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 Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!newspeer.monmouth.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!post.news-service.com!news1.surfino.com!not-for-mail Message-ID: <1526446.pM0PcP45id@linux1.krischik.com> From: Martin Krischik Subject: Re: [OT] Re: Teaching new tricks to an old dog (C++ -->Ada) Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Reply-To: martin@krischik.com Date: Sun, 06 Mar 2005 10:57:03 +0100 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> Organization: None User-Agent: KNode/0.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8Bit X-Complaints-To: abuse@surfino.com NNTP-Posting-Host: 83.169.175.19 (83.169.175.19) NNTP-Posting-Date: Sun, 06 Mar 2005 11:00:09 +0100 X-Trace: e7806422ad4a9f60c0ab620799 Xref: g2news1.google.com comp.lang.ada:8736 comp.lang.c++:44310 comp.realtime:1008 comp.software-eng:4539 Date: 2005-03-06T10:57:03+01:00 List-Id: Peter Koch Larsen wrote: > It is not a question of prevention. C++ allows you to do some really > dangerous things - in my mind rightfully so. So does Ada. In fact Ada.Unchecked_Convertion will convert variables no C++ compiler will ever dare to convert. Yes I know, you can allways use a reinterpret_cast in the middle. http://en.wikibooks.org/wiki/Programming:Ada:Subtypes#Unchecked_Conversion > When you do program in C++ > you must "constrain yourself" and not use the dangeous stuff - unless you > need to do so, of course ;-) In Ada you don't need to constrain yourself. I found that a very freeing exprience - after 10+ years of C/C++ programming. And I can still use the dangeous stuff when I need to. And see the difference in our sentences here: You: contrain, not use, unless - all so negative terms. Me: don't contrain, still use, when - so more positive terms. > 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. Have you ever seen the traffic in a country where a 10 $ or 10 � note will make any traffic policemen put is pen back into its pocket. Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com