Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22247 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87267 invoked by uid 1010); 8 Mar 2006 14:23:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87252 invoked from network); 8 Mar 2006 14:23:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2006 14:23:12 -0000 X-Host-Fingerprint: 160.9.128.17 mrelay-b.lmu.ac.uk Received: from ([160.9.128.17:26282] helo=mrelay-b.lmu.ac.uk) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id F3/2B-27106-EC8EE044 for ; Wed, 08 Mar 2006 09:23:11 -0500 Received: from localhost.lmu.ac.uk ([127.0.0.1] helo=localhost) by mrelay-b.lmu.ac.uk with esmtp (Exim 4.43) id 1FGzPl-0000eC-Ik; Wed, 08 Mar 2006 14:13:21 +0000 Received: from mrelay-b.lmu.ac.uk ([127.0.0.1]) by localhost (mrelay-b [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01385-03; Wed, 8 Mar 2006 14:13:18 +0000 (GMT) Received: from leedsmet-exch1.leedsmet.ac.uk ([160.9.35.117]) by mrelay-b.lmu.ac.uk with esmtp (Exim 4.43) id 1FGzNF-0000cW-St; Wed, 08 Mar 2006 14:10:46 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 8 Mar 2006 14:12:20 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] GOTO and/or BREAK LABEL Thread-Index: AcZByvKthEcZFrduRpmgpB55YVOcgwA7DeZw To: "Dmitry Stogov" , X-Virus-Scanned: by McAfee at Leeds Metropolitan University Subject: RE: [PHP-DEV] GOTO and/or BREAK LABEL From: M.Ford@leedsmet.ac.uk ("Ford, Mike") On 07 March 2006 09:28, Dmitry Stogov wrote: > Please reviw and vote. >=20 > 1) goto and break label > 2) goto only (like C) > 3) break label only (like Java) > 4) nothing 1) +0.25 2) -1e38 3) +1e38 4) -infinity Or, in other words, I want labelled break, and I don't want to have to emul= ate it with goto. As a user who spent several *days* tracking down a subtle bug caused by a c= ontinue n that hadn't been altered to continue n+1, I regard labelled break= as a vital addition -- for me, it's not the frequency with which it is use= d (very low, I agree), but the incredibly disproportionate maintenance burd= en (potentially extremely high). In my case, I was adding a level to a hea= vily nested looping/conditional structure (7 or 8 levels deep) extending ov= er several hundred lines, and out of the few break/continue statements that= needed adjusting I missed just one. If they had been labelled breaks, the= re would have been *no* maintenance problem, and I'd have had several more = days on the next step. If the "Java-like" syntax is seen as confusing, what about, as in some othe= r languages, interpolating the label into the for/foreach/while statement: for (....) label {...} or for label (...) {...} This is clearly a different animal from a goto target label: (but should be= in the same namespace, of course). OK, I'll shut up now and slope off into a corner. (Perhaps I should design= my own language whilst I'm there ... but nah, did that decades ago and got= bored -- prefer higher-level programming these days!) Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211=20 To view the terms under which this email is distributed, please go to http:= //disclaimer.leedsmet.ac.uk/email.htm