Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Rod Pemberton Newsgroups: comp.lang.forth Subject: Re: BEGIN WHILE UNTIL THEN Date: Fri, 8 Jan 2016 10:11:53 -0500 Organization: Aioe.org NNTP Server Lines: 31 Message-ID: <20160108101153.4d4729cc@_> References: <08c4616c-21ad-4bdf-9fe4-a9e5ee2e5dad@googlegroups.com> <20160107051310.67828226@_> NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Claws Mail 3.13.1 (GTK+ 2.24.10; x86_64-unknown-linux-gnu) Xref: csiph.com comp.lang.forth:44692 On Fri, 8 Jan 2016 12:36:25 +1100 "HAA" wrote: > Rod Pemberton wrote: > > Since the BEGIN-UNTIL now exits for two > > conditions, you must determine which condition caused > > it to exit, afterwards. > > ... > > This is the problem ANS WHILE was designed to solve. It lets you > exit the loop at different points avoiding the need to test (again) > which condition caused the exit e.g. > > ... > > The topic is discussed by Brodie/Moore in 'Thinking FORTH' Chapter > 8 ... > > "The value is that you get simpler programs. And it costs nothing." It doesn't cost nothing. The branching clearly increases. My understanding is that modern processors are good with single loops with a backwards branch. That might be somewhat simplistic or out of date, but the point of branching complexity not being good remains. Rod Pemberton