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!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada lacks lighterweight-than-task parallelism Date: Mon, 2 Jul 2018 18:48:36 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <993f28de-6a64-480b-9c6e-d9714bcdef0d@googlegroups.com> <167bec10-2a52-4c79-958d-91faadad915b@googlegroups.com> <2d6a5ab7-812f-47a9-a958-44177a3cf203@googlegroups.com> <64a526cb-e6d5-44a6-b446-5b652ebe60ca@googlegroups.com> <845ed7d6-f0c0-4c6e-834c-eea8f2ad1792@googlegroups.com> NNTP-Posting-Host: 3CrKQyqWAJZHy6zYVP/kUg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.3 Xref: reader02.eternal-september.org comp.lang.ada:53509 Date: 2018-07-02T18:48:36+02:00 List-Id: On 2018-07-02 18:01, Marius Amado-Alves wrote: > " ... if the same object must be iterated differently it must offer two different interfaces for doing so" (K.) > > Absolutely, and I've done that multiple times. Then 'Parallelizeable would be a property of the iterator--not of the object. A simple Boolean attribute indicating to the compiler "parallelize if you can" or "dont." (Defaulting to False I guess.) No, there should be no any iterators in the first place. In a properly designed language you need no helper types. And it is certainly not a Boolean flag. A property is something which can be proved to be true. One property is existence of random independent evaluation of the access. It is a property of the given set type (or mapping/container type). Another property is absence of cross effects of the loop body evaluation, which depends on the properties of operations and objects that appear in the body. None of these are properties of the loop itself, so it is strange to tie this to the loop statement. That would be a promise the language cannot hold unless it can prove it holding. If it can, and the only way to know is the contracts of the objects involved, then it would need no further hints. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de