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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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!k19g2000yqn.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: C++0x and Threads - a poor relation to Ada's tasking model? Date: Wed, 12 Aug 2009 08:14:15 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6239906b-e952-4bf9-8a11-b7faf942bdde@k19g2000yqn.googlegroups.com> References: <7q2385104kihs87d79p8kfphuoki6r01vq@4ax.com> <81a101a3-b46e-4268-973c-356c6119ee2b@c14g2000yqm.googlegroups.com> <2785ff1e-661b-41ce-95a8-cef2862e2907@b14g2000yqd.googlegroups.com> NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1250090055 19855 127.0.0.1 (12 Aug 2009 15:14:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 Aug 2009 15:14:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k19g2000yqn.googlegroups.com; posting-host=137.138.182.236; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.13) Gecko/2009073021 Firefox/3.0.13,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7699 Date: 2009-08-12T08:14:15-07:00 List-Id: On 12 Sie, 11:27, Ludovic Brenta wrote: > I think we're near the crux of the problem: C++ cannot and will not > *mandate* such checks [...] > > Ada *mandates* the checks [...] But it has nothing to do with whether the given feature is implemented in terms of keywords or standard library calls, has it? That is what Jim was talking about. > That's why Ada's tasking is inherently safer than the proposed C++ > tasking. So what *compile-time* checks are mandated by Ada in tasking? The only checks that I'm aware of are those that lead to Program_Error at run-time. Indeed, the classic C++ way of dealing with problems is the so-called undefined behaviour, but this again has nothing to do with tasks/ threads in particular. Even if multithreading in C++ was defined in terms of keywords (as opposed to library calls), it would not change anything in how the problems are dealt with. That's why introducing new reserved words in C++ would not buy anything. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada