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.68.135.106 with SMTP id pr10mr3587552pbb.3.1335381686320; Wed, 25 Apr 2012 12:21:26 -0700 (PDT) Path: r9ni97910pbh.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? Date: Wed, 25 Apr 2012 12:15:13 -0700 (PDT) Organization: http://groups.google.com Message-ID: <26317529.742.1335381313996.JavaMail.geo-discussion-forums@ynje10> References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> <31103380.3735.1335377235157.JavaMail.geo-discussion-forums@vbuo17> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1335381686 21624 127.0.0.1 (25 Apr 2012 19:21:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 25 Apr 2012 19:21:26 +0000 (UTC) In-Reply-To: <31103380.3735.1335377235157.JavaMail.geo-discussion-forums@vbuo17> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-04-25T12:15:13-07:00 List-Id: On Wednesday, April 25, 2012 11:07:15 AM UTC-7, okel...@users.sourceforge.n= et wrote: > On Wednesday, April 25, 2012 9:47:06 AM UTC+2, Martin wrote: > > Ok, we don't officially have Ada2012 yet but as no new features are goi= ng > > to be added to it, now seems like a good time to start thinking about t= he > > next revision. >=20 > It's been said before but I'll say it again: > A "continue" statement for quick jump to end of loop body. >=20 > I've seen this worked around as follows: >=20 > loop > if Some_Condition then > goto Continue; > end if; > -- a couple 100 statements later ... > <> null; > end loop; >=20 > -- Oliver And why would having a "continue" statement be better than the workaround? = If I'm looking at a loop like this, and I see a <> label at the = end, then I know that I can't count on the last however-many statements in = the loop being executed before the loop loops back, because there's probabl= y a branch to the label somewhere else in the loop. With a "continue" stat= ement, I might be looking at the loop and going nuts trying to figure out "= I know this loop is cycling back, and these last two statements should be e= xecuted before the end of the loop because they're not inside an IF stateme= nt, so they should be calling this routine, but it seems like it's not bein= g called--why??" Trust me, I've had this exact experience. When I was pro= gramming in C I made the decision never to use this statement. It appears to me that using "continue" makes things more difficult for the = reader in order to gain the advantage of saving about sixteen keystrokes fo= r the writer. I don't see any advantage in using this statement even in la= nguages that support it, and I certainly don't see anything to be gained fr= om adding it to Ada. -- Adam