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!feeder3.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!news.mixmin.net!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: Thu, 11 Aug 2011 03:20:55 -0500 Organization: A noiseless patient Spider Message-ID: References: <1e292299-2cbe-4443-86f3-b19b8af50fff@c29g2000yqd.googlegroups.com> <1fd0cc9b-859d-428e-b68a-11e34de84225@gz10g2000vbb.googlegroups.com> <9ag33sFmuaU1@mid.individual.net> <1d8wyhvpcmpkd.ggiui9vebmtl.dlg@40tude.net> Injection-Date: Thu, 11 Aug 2011 08:20:46 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="bUZkUS1QLqpHyXuWevVWHQ"; logging-data="26919"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yZWbgZdq2YYJzI69d+Cah" 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:knfMHA7O1ms1g56itZyuxQOXbFA= X-Priority: 3 X-MSMail-Priority: Normal Xref: g2news1.google.com comp.lang.c++:82804 comp.lang.ada:20530 Date: 2011-08-11T03:20:55-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1d8wyhvpcmpkd.ggiui9vebmtl.dlg@40tude.net... > On Wed, 10 Aug 2011 17:37:28 -0500, Randy Brukardt wrote: > >> There are uses for wrapping types, but they are far less likely than >> wanting >> overflow detection. The default should be to catch errors, not turn >> them >> into different ones. > > The OP mentioned image processing, the behavior frequently needed there > is > saturated integer arithmetic, which is nether ranged nor modular. > > As for modular types, wrapping is the mathematically correct behavior, > it > is not an error. > > You just cannot provide every possible arithmetic at the language > level. > What do you think the practical level of limitation is? Were you thinking "beyond integers" with your statement? What kinds of integer types would you like to see built-in to a hypothetical ideal language?