Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!crltrx!decvax!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.misc Subject: Re: Anyone want to design a language? Message-ID: <16136@haddock.ima.isc.com> Date: 10 Mar 90 00:46:21 GMT References: <22569:05:10:24@stealth.acf.nyu.edu> <8475@wpi.wpi.edu> <24123:04:14:07@stealth.acf.nyu.edu> <1966@l.cc.purdue.edu> <191@gollum.twg.com> <78=1NPDxds13@ficc.uu.net> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 34 In article <78=1NPDxds13@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: >In c-ish syntax, how about this as the loop construct: > while (expr) > statement > while (expr) > statement > ... You'd need to tweak the syntax to distinguish a two-exit loop from two adjacent loops, of course. >Explicit breaks or continues would be deprecated... I'm not sure how well the issue addressed by this "multiple while" corresponds to that addressed by break and continue. (Note: If it's really a *new* language, rather than a suggestion for the next version of C, then you don't need to deprecate things--you simply remove them immediately. There's no backward compatability problem.) >The for loop would come out as: > initial > while (test) > body > while (true) > increment I must object. The whole point of C's for-statement is to put all the loop control in one place, at the top of the statement. This looks like a step backwards. And isn't that clause "while (true)" a no-op in this language? I'd expect it to normally be omitted, so that the increment is simply the last statement of the body. Karl W. Z. Heuer (karl@ima.ima.isc.com or harvard!ima!karl), The Walking Lint