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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,583275b6950bf4e6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-22 17:48:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!chi1.webusenet.com!news.webusenet.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny01.gnilink.net.POSTED!53ab2750!not-for-mail From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030419 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Quality systems (Was: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)) References: <3ec4b1c9$1@news.wineasy.se> <9fa75d42.0305161748.1735fc32@posting.google.com> <4W%xa.28765$cK5.11964@nwrdny02.gnilink.net> <1053353256.804734@master.nyc.kbcfp.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 23 May 2003 00:48:38 GMT NNTP-Posting-Host: 162.84.146.112 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny01.gnilink.net 1053650918 162.84.146.112 (Thu, 22 May 2003 20:48:38 EDT) NNTP-Posting-Date: Thu, 22 May 2003 20:48:38 EDT Xref: archiver1.google.com comp.lang.ada:37664 Date: 2003-05-23T00:48:38+00:00 List-Id: Randy Brukardt wrote: > Virtually every time I use a modular type, I end up tracking down some > bug at runtime that would have been caught had there been an overflow > check. Why are you using a modular type if you don't want the wraparound semantics? Just use regular types and do the mod yourself. It seems unAdalike to use the wrong tool for the job. > I often write checks like: > if Index-1 > 0 then Many of us would write if Index > 1 and then not have any problems. Why do it the unnatural way?