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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,25aa3c7e1b59f7b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-03 14:07:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <3C34BF2C.6030500@mail.com> Subject: Re: A case where Ada defaults to unsafe? Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Thu, 03 Jan 2002 17:07:52 EST Organization: http://www.newsranger.com Date: Thu, 03 Jan 2002 22:07:52 GMT Xref: archiver1.google.com comp.lang.ada:18494 Date: 2002-01-03T22:07:52+00:00 List-Id: In article <3C34BF2C.6030500@mail.com>, Hyman Rosen says... >So in Ada, one could say 'if a /= 0 and b/a > 3' and fall into a >trap that would not happen in C/C++. Discuss? ..only if one incorrectly assumes they short-circuit. This is basicly equivalent to saying Ada is bad because it doesn't behave exactly like C. The reason things were done this way was so that the optimizer could rearrange and short-circuit the expression itself (or not) depending on what is more efficient on its architecture. See the Ada 83 Rationale 3.10 if you really want a discussion ( online at http://archive.adaic.com/standards/83rat/html/ratl-03-10.html#3.10 ) If you are going to complain about things that are unsafe in Ada but not in C, you'd better get started on assuming an integer is passed by value too. And then tasking introduces a world of possible errors that C doesn't have... --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.