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-7-bit Path: g2news2.google.com!postnews.google.com!b14g2000yqd.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: C++0x and Threads - a poor relation to Ada's tasking model? Date: Wed, 12 Aug 2009 02:27:14 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2785ff1e-661b-41ce-95a8-cef2862e2907@b14g2000yqd.googlegroups.com> References: <7q2385104kihs87d79p8kfphuoki6r01vq@4ax.com> <81a101a3-b46e-4268-973c-356c6119ee2b@c14g2000yqm.googlegroups.com> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1250069234 12710 127.0.0.1 (12 Aug 2009 09:27:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 Aug 2009 09:27:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b14g2000yqd.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.13) Gecko/2009073022 Firefox/3.0.13,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7692 Date: 2009-08-12T02:27:14-07:00 List-Id: Maciej Sobczak wrote on comp.lang.ada: > Above, std::printf, even though not formally a keyword, has attracted > the compiler's attention and allowed it to perform type checks that > are not mandated by the language itself. > > Can you give an example of correctness checking in the area of > multithreading that is possible with reserved words and that is > *certainly* not possible with library calls? I think we're near the crux of the problem: C++ cannot and will not *mandate* such checks, leaving compiler writers the option to issue warnings (not errors) if they do add the checks and if the user asks for them (i.e. in the case of gcc, passes -Wall explicitly). Ada *mandates* the checks and requires errors (not warnings) from all conformant compilers in their default mode. The user would have to pass additional, implementation-defined options or pragmas to *not* see the errors. That's why Ada's tasking is inherently safer than the proposed C++ tasking. -- Ludovic Brenta.