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-Thread: 109fba,cd8ed9115942852f X-Google-NewGroupId: yes X-Google-Thread: 103376,b92b95c9b5585075 X-Google-NewGroupId: yes X-Google-Attributes: gid4f1905883f,gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Jed" Newsgroups: comp.lang.c++,comp.lang.ada Subject: Re: Why use C++? Date: Fri, 12 Aug 2011 14:59:19 -0500 Organization: A noiseless patient Spider Message-ID: References: Injection-Date: Fri, 12 Aug 2011 19:59:42 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="MIpMIVYD9PDhsUAPC84lbA"; logging-data="7682"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vBkxS2n+LuEPvxlejGv81" X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-RFC2646: Format=Flowed; Original X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 Cancel-Lock: sha1:cIJiS2OVU/1Ve8atDWGKH9TN5V4= X-Priority: 3 X-MSMail-Priority: Normal Xref: g2news1.google.com comp.lang.c++:82890 comp.lang.ada:20582 Date: 2011-08-12T14:59:19-05:00 List-Id: "Fritz Wuehler" wrote in message news:e42b54adb274b7447820bb6982baf6f5@msgid.frell.theremailer.net... > "Jed" wrote: > >> >> "Randy Brukardt" wrote in message >> news:j22c61$5lo$1@munin.nbi.dk... >> >> > Modular types are something altogether different (and in all >> > honesty, >> > rare enough that direct language support is of dubious value -- most >> > of >> > us supported adding them to Ada 95 simply because it was the only >> > way >> > to get any support for the largest unsigned integer type). >> > >> >> Isn't the wrapping behavior just a consequence of wanting to get a >> representation in which signed and unsigned integers can be easily >> converted to each other? I.e., "they" didn't sit down and say, "let's >> implement unsigned integers with wrapping behavior". > > More likely it's a consequence of doing nothing, because the natural > behavior of the hardware is that unsigned integers wrap. Unless there > was a > specific language feature designed to prevent this, that is how it will > work > on most platforms. > Ah ha! Confirmation comes. I hypothesized similar, further up in the thread.