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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,14f7200925acb579 X-Google-Attributes: gid103376,public From: Paul Graham Subject: Re: No Go To's Forever! Date: 2000/03/22 Message-ID: <38D9233B.D51B16A3@cadence.com>#1/1 X-Deja-AN: 600984429 Content-Transfer-Encoding: 7bit References: <38D7B41D.B3494C6A@lmco.com> <8b8m2e$8201@news.cis.okstate.edu> <8b9fk3$l18$1@nnrp1.deja.com> <38D8DFC2.778826FB@cadence.com> <8barci$4ks$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Cadence Design Systems Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-03-22T00:00:00+00:00 List-Id: I think the goto implementation of the 'continue' statement is fragile in the sense that it depends on the "<> null;" being the last statement in the loop. A maintainer who wasn't familar with this idiom might add statements at the end of the loop body, thereby breaking your construct. On the other hand, the continue statement in C is really best used in a for loop, because you want some guarantee that the loop state will advance. In a while loop it is all too easy for a misplaced continue to create an infinite loop. Paul Robert Dewar wrote: > > In article <38D8DFC2.778826FB@cadence.com>, > Paul Graham wrote: > > > Why is there no 'continue' statement in Ada? You've shown > > that the function of 'continue' is desirable. > > Yes, the *function* of continue is desirable, but on the other > hand a continue is indeed a goto, so why not say so? That's the > other point of view, and as you see from the previous post, > some people find it clearer to use a goto here. We did discuss > this in the language revision but there was insufficient > support for this language addition.