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 Path: g2news2.google.com!postnews.google.com!l9g2000prd.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.c++,comp.lang.ada Subject: Re: Why use C++? Date: Fri, 12 Aug 2011 09:39:06 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4115b619-2c12-494c-a616-ac8542119de3@l9g2000prd.googlegroups.com> 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> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1313167146 32353 127.0.0.1 (12 Aug 2011 16:39:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 12 Aug 2011 16:39:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l9g2000prd.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news2.google.com comp.lang.c++:92637 comp.lang.ada:21548 Date: 2011-08-12T09:39:06-07:00 List-Id: On Aug 11, 10:16=A0pm, Robert Wessel wrote: > On Fri, 12 Aug 2011 00:02:55 -0500, "Randy Brukardt" > > > > > > wrote: > >"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 t= hem > >>> into different ones. > > >> The OP mentioned image processing, the behavior frequently needed ther= e is > >> saturated integer arithmetic, which is nether ranged nor modular. > > >I'm not familar with any hardware on which saturated integer arithmetic = is > >provided. If it was, I would expect direct language support for it (whic= h > >need not require new kinds of types). > > Many DSPs, graphics coprocessors and the like have saturating integer > arithmetic, usually in addition to conventional arithmetic. TI c6x series, for example (that's the one I'm most familiar with). -- Adam