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: border1.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!fx09.iad.POSTED!not-for-mail From: Brad Moore User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: =?windows-1252?Q?GNAT=A0and_Tasklets?= References: <8277a521-7317-4839-b0b6-97f8155be1a4@googlegroups.com> <9e1d2b9f-1b97-4679-8eec-5ba75f3c357c@googlegroups.com> <478c81f9-5233-4ae1-a3eb-e67c4dbd0da1@googlegroups.com> <1r2ziulc78imb$.ad6zx5upic6s$.dlg@40tude.net> <1gfkkgi7ukoj3$.1pqtchynzp9rc$.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <80Ylw.945502$Fo3.7653@fx09.iad> NNTP-Posting-Host: 68.145.219.148 X-Complaints-To: internet.abuse@sjrb.ca X-Trace: 1419267204 68.145.219.148 (Mon, 22 Dec 2014 16:53:24 UTC) NNTP-Posting-Date: Mon, 22 Dec 2014 16:53:24 UTC Date: Mon, 22 Dec 2014 09:53:25 -0700 X-Received-Bytes: 3142 X-Received-Body-CRC: 2942337794 Xref: number.nntp.giganews.com comp.lang.ada:191498 Date: 2014-12-22T09:53:25-07:00 List-Id: On 14-12-21 04:21 PM, Shark8 wrote: > On 21-Dec-14 12:45, Brad Moore wrote: >>>> I have never seen a programming language that has parameters on an if >>>> statement. >>> >>> But all if-statements have a parameter: the conditional they test. >> >> Not the sort of parameters we have been discussing though. Parameters >> that identify all the external variables that are read and/or modified >> inside the if statement. > > True. > Maybe we could overload WITH or AT, or perhaps have an optional area > [like declare] to be explicit about them? Note also, if we start allowing this to be specified for if statements, you'd also want to allow for other constructs such as while loops, normal blocks, etc, as well as subprograms. What we were proposing is to just allow this for subprograms. Subprograms already identify parameters in this way, but in addition we were proposing adding a Global aspect that could be applied to subprograms that identifies the side effects on external variables. Subprograms already allow aspects, so this fits in well with existing syntax, whereas statements such as if statements, loop statements, and block statements, do not currently allow aspects in the syntax, so adding aspect support for those is a bigger change. I also think it would become too tedious and add too much clutter and noise to the readability of the code if we start specifying these effects on all types of statements. Being able to do this on subprograms feels to me like the happier middle ground.