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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81bb2ce65a3240c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.141.4 with SMTP id k4mr1120954bku.6.1337035779568; Mon, 14 May 2012 15:49:39 -0700 (PDT) MIME-Version: 1.0 Path: e27ni2565bkw.0!nntp.google.com!news2.google.com!goblin3!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? Date: Mon, 14 May 2012 22:49:38 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: Lf0Nl3CcQzx+ocHx9cmuGg.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Tom's custom newsreader Date: 2012-05-14T22:49:38+00:00 List-Id: >>>> P.S. I wonder why people keep on calling that thing loop. It has little to >>>> do with iterations. Programming should be about what you want to happen, and as little as possible about the details of how it happens. So for I in 1 .. 10 do has the advantage that "do" doesn't imply ordering the way "loop" does. But A := (others=>0); is a still better way of saying "fill array A with zeros and I don't care what order or how much in parallel you do it". Similarly, you can say A := B+C; where function "+" is implemented by a call to a library routine that (may) use machine parallelism. Certainly for I in A'range loop A(I) := B(I) + C(I); end loop; is much more verbose and the use of "loop" instead of "do" quite unnecessarily suggests the programmer insists on a sequential order. > I suppose somewhere there need to be a way to set max concurrency. This ability to say something about the resources to use on the target machine is normally done with compilation parameters, which is pretty limiting. Specifying the max concurrency for a piece of code is analogous to specifying that certain arrays are rarely accessed and are good candidates for swapping, while others really need to stay in RAM. I've not seen that in a language either.