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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public From: "John G. Volan" Subject: Re: Software landmines (was: Why C++ is successful) Date: 1998/09/06 Message-ID: <35F370E4.C161AB16@sprintmail.com>#1/1 X-Deja-AN: 388601634 Content-Transfer-Encoding: 7bit References: <6rnh8p$dno$1@nnrp1.dejanews.com> <6rs6is$6ck$1@nnrp1.dejanews.com> <6s6h4a$ha9$1@nnrp1.dejanews.com> X-Posted-Path-Was: not-for-mail Content-Type: text/plain; charset=us-ascii X-ELN-Date: Sun Sep 6 22:36:02 1998 Organization: EarthLink Network, Inc. Mime-Version: 1.0 Reply-To: johnvolan@sprintmail.com Newsgroups: comp.lang.ada Date: 1998-09-06T00:00:00+00:00 List-Id: Matthew Heaney wrote: > > For example, there's a pernicious myth that exiting (or returning) from > the middle of a loop is bad, and that the only proper way to write a > loop is to state the termination condition explicitly, as a predicate > appearing at the top of the loop. Maybe the real problem is not where the loop exit occurs _vertically_, but rather where it occurs _horizontally_ -- that, at what nesting depth. Take a look at the thread "Mid-Loop 'Until' Proposal" from c.l.e. Consider the comparison I make between a possible Eiffel extension that would grant a loop more freedom as to where an "until" clause could be placed, yet still require the terminating postcondition to appear at the outermost level of nesting; versus Ada's "exit when" statement, which can reach out and affect the control-flow of its enclosing loop from some arbitrarily deep level of nesting. -- indexing description: "Signatures for John G. Volan" self_plug: "Ex Ada guru", "Java 1.1 Certified", "Eiffelist wannabe" two_cents: "Java would be even cooler with Eiffel's assertions/DBC, % %generics, true MI, feature adaptation, uniform access, % %selective export, expanded types, etc., etc..." class JOHN_VOLAN_SIGNATURE inherit SIGNATURE invariant disclaimer: not (opinion implies employer.opinion) end -- class JOHN_VOLAN_SIGNATURE