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-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!s31g2000yqs.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: Fri, 14 Aug 2009 00:39:14 -0700 (PDT) Organization: http://groups.google.com Message-ID: <270bf4df-4d0b-4621-9005-80ef8ab51634@s31g2000yqs.googlegroups.com> References: <7q2385104kihs87d79p8kfphuoki6r01vq@4ax.com> <81a101a3-b46e-4268-973c-356c6119ee2b@c14g2000yqm.googlegroups.com> <2785ff1e-661b-41ce-95a8-cef2862e2907@b14g2000yqd.googlegroups.com> <6239906b-e952-4bf9-8a11-b7faf942bdde@k19g2000yqn.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 1250235554 2728 127.0.0.1 (14 Aug 2009 07:39:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 14 Aug 2009 07:39:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s31g2000yqs.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.1.2) Gecko/20090729 Firefox/3.5.2,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7758 Date: 2009-08-14T00:39:14-07:00 List-Id: On 13 Sie, 14:47, "Peter C. Chapin" wrote: > Ada provides language syntax for concurrency. It feels cleaner to me than > any of the C++ thread libraries I have used. Is that because those C++ > libraries just don't have the interface "right?" Maybe. But it might also > be because it's just not possible to express concurrency in a nice clean > way when using only library calls. Right and this is the first valid argument for preferring built-in language support over library-based API. I agree with that. You have to, however, take into account the history differences between these two languages. Adding the concurrency features at the very beginning when the language is designed is more comfortable than doing it later on. There is a general dislike for adding new reserved words in subsequent language revisions for compatibility reasons. You cannot break anything by adding new API in the standard namespace (which is reserved anyway), but you can break a lot by introducing new reserved words like "thread", "task" or "job". You can argue that built-in support for a given feature is better for the reasons of syntax clarity, but it could not be applied to C++ within its constraints. I think this is a tradeoff, but the final solution is optimal for the target community. Note: Some time ago I have written an article on how a language-based support for basic threading features could possibly look like in C++: http://www.inspirel.com/articles/Possible_Syntax_For_Cpp_Threads.html I still think that what was standardized will serve the community better. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada