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!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!novia!news-xxxfer.readnews.com!news-out.readnews.com!postnews3.readnews.com!not-for-mail Newsgroups: comp.lang.ada Subject: Re: C++0x and Threads - a poor relation to Ada's tasking model? From: "Peter C. Chapin" 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> Message-ID: User-Agent: Xnews/5.04.25 Date: 13 Aug 2009 12:47:39 GMT Organization: SoVerNet (sover.net) NNTP-Posting-Host: 14602e50.news.sover.net X-Trace: DXC=kHGgd Maciej Sobczak wrote in news:6239906b-e952- 4bf9-8a11-b7faf942bdde@k19g2000yqn.googlegroups.com: > That's why introducing new reserved words in C++ would not buy > anything. Using library calls limits in some respects the way in which concepts can be expressed. It is true that the compiler can be aware of the semantics of the standard library. However, the syntax of function calls can still make expressing some ideas awkward. For example, I'm wondering how C++ try and catch blocks would look as library calls. My guess is that they would be harder to read and harder to understand than they are now as language syntax. 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. I've been recently studying the language Scala which provides a mechanism for, essentially, adding new syntax to the language (with some restrictions). Scala's support for concurrency (which is similar to Erlang's) is implemented as a library but the result looks like built in language syntax. It's nice. Peter