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: a07f3367d7,4215feeab2a8154a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!s15g2000yqs.googlegroups.com!not-for-mail From: REH Newsgroups: comp.lang.ada Subject: Re: C++0x and Threads - a poor relation to Ada's tasking model? Date: Fri, 14 Aug 2009 06:00:05 -0700 (PDT) Organization: http://groups.google.com Message-ID: <57766742-5e6e-4b68-8094-57db1fa8951d@s15g2000yqs.googlegroups.com> References: <362f621e-a01c-4772-ba02-4e18e9962188@j19g2000vbp.googlegroups.com> <128d63da-361f-4e33-be5e-e06bdc71e39f@r34g2000vba.googlegroups.com> <850893f5-46e5-443f-af0f-f16eef5cfa37@n2g2000vba.googlegroups.com> NNTP-Posting-Host: 69.205.133.144 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1250254806 3681 127.0.0.1 (14 Aug 2009 13:00:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 14 Aug 2009 13:00:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s15g2000yqs.googlegroups.com; posting-host=69.205.133.144; posting-account=GwkXCgoAAABFSG45Q--uHVZG6zn6ec-e User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7776 Date: 2009-08-14T06:00:05-07:00 List-Id: On Aug 14, 7:09=A0am, John McCabe wrote: > Under the circumstances I use C/C++ to represent C and C++ as this > particular example is common to both; they both incorpoate > overwrapping semantics for operations on integer types (unlike Ada, > which provides a separate Modular type for that purpose). C++ and C provide separate types of that purpose also. Signed and unsigned integers are not the same type. They have different rules. It's a common misconception that signed integers portably wrap. Signed integer do not have "overwrapping sematics." Using C/C++ is frowned upon by both the C and C++ communities. Even in your simple example, the languages have different rules as to what is portable. > > >Ada has specific requirements for > >what happens when your Int16 overflows. C++ considered a signed > >integer overflow undefined behavior. The compiler is allowed to do > >anything it wants. > > Oh dear. That! That is the only point I was trying to make in answering your original question of how the communities are different. You are appalled by that because it is not safe. The C++ community is not because it allows the compiler maximum flexibility for raw speed. Which position is "better" wasn't my point, only the fact that the difference exists. REH