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 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-19 07:32:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!213.200.246.247!not-for-mail From: Vinzent Hoefler Newsgroups: comp.lang.ada Subject: Re: Quality systems (Was: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)) Date: Mon, 19 May 2003 16:31:48 +0200 Organization: JeLlyFish software Message-ID: References: <9fa75d42.0305141747.5680c577@posting.google.com> <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> NNTP-Posting-Host: 213.200.246.247 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: fu-berlin.de 1053354772 28182431 213.200.246.247 (16 [175126]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:37513 Date: 2003-05-19T16:31:48+02:00 List-Id: Hyman Rosen wrote: >Vinzent Hoefler wrote: > > (and that sometimes might be not that easy as it looks at the first = glance). > >That's because the Ada folks got clever and decided that the >modulus didn't need to be a poer of two. You don't seem to see the real problem. Try that with binary values on a machine with one's complement. Try that on a machine that throws an overflow error if the sign changes... There is much more work involved to make it work correct than to simply leave it implementation defined like in C. >Doesn't Dewar rant on this subject occasionally? So what? You don't have to use it (BTW, SPARK explicitely forbids that), but the problem would remain the same for some machines. >> I doubt that. C just got modular types because it was convinient and >> natively supported by the machine. > >That doesn't mean that Ada didn't copy the notion from C. I still doubt that. And unless someone from the language designers can definitely confirm that, I will keep doing so. The use(fulness) of modular types is older than C. >> No. In C you only get the overflow checks (for signed types) if the >> machine itself supports it. > >That's silly. Yes. Don't bother, so is the whole language. ;-> >You get whatever the compiler gives you. If someone >wanted to implement overflow checking, that would be perfectly >legitimate, regardless of hardware. Why should someone do such worthless stuff? According to the standard, it's implementation defined (IIRC) either way. So why should someone do the work to implement an meaningless overflow "check" that leads to a program crash rather than just go on calculating with fancy values like all the others expect it to do? Just to break some existing C-programs? Vinzent. --=20 Parents strongly cautioned -- this posting is intended for mature audiences over 18. It may contain some material that many parents would not find suitable for children and may include intense violence, sexual situations, coarse language and suggestive dialogue.