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!s15g2000yqs.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 07:51:38 -0700 (PDT) Organization: http://groups.google.com Message-ID: <75dc1ce3-18d3-4e24-a91d-08be22dc1129@s15g2000yqs.googlegroups.com> References: <7q2385104kihs87d79p8kfphuoki6r01vq@4ax.com> <7961a91c-a5af-40e2-bbc0-6bf69a98176d@z31g2000yqd.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 1250088698 14979 127.0.0.1 (12 Aug 2009 14:51:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 Aug 2009 14:51:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s15g2000yqs.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:7697 Date: 2009-08-12T07:51:38-07:00 List-Id: On 12 Sie, 14:25, John McCabe wrote: > >No standard can force anybody to provide implementations. Vendors will > >do it if they will see a business opportunity in it. > > My point/question really was whether it will be acceptable for a C++ > compiler to NOT support the threading library (i.e. if a vendor > chooses not to provide a bare board run-time system with built in > threading). Why not? If this is acceptable for their customers... Note that the vendor can always sell a C++98 compiler naming it as such and avoiding any accusations of wrongly using the C++ name on a non-conforming product. They can even provide everything else as "extensions" and still be OK. It is somewhat like a question on whether an Ada vendor can today sell the Ada compiler even if it does not implement interfaces, object-dot- notation, etc. Sure - just call it Ada95 and be explicit about it. This is actually what we observe. > It seems to me that Ada's model started off with a clean slate and was > designed from the ground up whereas with C++ it's always been a case > of "how can we bolt this on". This is true and reflects the fact that operating systems evolved faster than the language in this respect. > As I mentioned earlier I've not read a huge amount about this yet, but > I've seen little evidence that there are any standards proposed in C++ > to handle thread priorities, dispatching policies and so on. Because the target is different. And because the C++ committee, unlike the Ada one, feels a bit uncomfortable with the idea of *optionally implemented* parts of the language. If you need these features in C++, talk to your compiler and OS vendor. At the end, if you find an Ada compiler that offers these features on a given OS, then apparently there is some API provided by the OS that enables these features (and which API is being used by the Ada run- time) and there is no reason not to benefit from them in C++ as well. Of course there is always an argument that the use of these features is portable in Ada and not portable in C++ (as there is no standard API for them), but frankly - if you need *these* features, you are targeting a very specific hardware/OS environment anyway and therefore code portability is of lesser importance. In this context I think that what the C++ committee did is very fair and rational, as it addresses the overwhelming majority of users with something that is simple to implement while putting perhaps some more work on the minority that has very specific needs. It would be wrong to do the other way round. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada