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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!reality.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: RFC: Prototype for a user threading library in Ada Date: Thu, 23 Jun 2016 17:12:04 -0500 Organization: JSA Research & Innovation Message-ID: References: <58b78af5-28d8-4029-8804-598b2b63013c@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1466719923 3853 24.196.82.226 (23 Jun 2016 22:12:03 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 23 Jun 2016 22:12:03 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:30896 Date: 2016-06-23T17:12:04-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:nkg78j$1keu$1@gioia.aioe.org... > On 23/06/2016 03:42, Randy Brukardt wrote: > >> I'd like to understand better the motivations for these features, so if >> you >> (or anyone else) wants to try to explain them to me, feel free. > > The motivation is a two-liner. Let you have some consumer of data: > > procedure Write (Buffer : String; Last : out Integer); > > It may take less than the whole string when called, but will take more > data later. So, the parameter Last. Now you want to write a program in a > *normal* way: > > Write ("This"); > Write ("That"); > > That's it. That wasn't my question; I'm wondering the motivation for these features in terms of parallelization. In today's world, it's impossible to consider any feature in a purely sequential manner. The expressiveness gain (if any) is secondary. And the OP was talking about parallelism, not generators. The generator proposal as expressed in AI12-0197-1 is just too expensive to consider for a purely sequential feature. For Janus/Ada on Windows, we'd either have to throw away 1/3 of the back-end of the compiler (and generally use slower instructions in some cases, impacting all code), or implement these *exactly* as we do tasks (with a TCB, context switching, and so on). [Not to mention the extensive changes needed to the front-end.] For something to be worth that sort of effort, it has to benefit a large percentage of programs. This (as a purely sequential feature) doesn't do that. Randy.