Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22256 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14451 invoked by uid 1010); 8 Mar 2006 21:23:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 14435 invoked from network); 8 Mar 2006 21:23:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2006 21:23:15 -0000 X-Host-Fingerprint: 82.248.173.163 lns-bzn-19-82-248-173-163.adsl.proxad.net Received: from ([82.248.173.163:6306] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 60/A9-27106-34B4F044 for ; Wed, 08 Mar 2006 16:23:15 -0500 To: internals@lists.php.net,Dmitry Stogov Message-ID: <440F4C95.4080700@toggg.com> Date: Wed, 08 Mar 2006 22:28:53 +0100 User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <000001c641c9$80dbfad0$6e02a8c0@thinkpad> In-Reply-To: <000001c641c9$80dbfad0$6e02a8c0@thinkpad> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 82.248.173.163 Subject: Re: GOTO and/or BREAK LABEL From: bertrand@toggg.com (bertrand Gugger) Dmitry Stogov wrote: > Hi, > > Because of some confused people I reverted "break label" patch and post it > for discussion once again together with GOTO patch. > > Please reviw and vote. > > 1) goto and break label > 2) goto only (like C) > 3) break label only (like Java) > 4) nothing > > My vote: (1) +0.5, (4) +0.5 > > Thanks. Dmitry. > I'm not concerned by the vote. "break" should be consistant with "continue" so break labels could only be "like Java". if confused with "goto", what are labels then ? the case is very well shown by someone in the list, can't find the post back, as: etiquette: while (...) { ... break etiquette; // breaks loop, next after the } ... continue etiquette; // continues loop, next after the { ... goto etiquette; // breaks and restarts loop ... } I can see what the 3 do with respect to any vote conclusion here. Mixing "goto" with "break" and "continue" could bring confusion. Not necessarly if established that goto will break any loop up to the one where the target is. Assuming labels can also be applied to non "loop" constructs, then goto should break all loops up to the loop labeled by etiquette or containing etiquette on its direct level. Finally, I see goto as a nightmare, here. Last troll's note: goto has 2 "O" as Object Oriented -- toggg