Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22259 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30488 invoked by uid 1010); 8 Mar 2006 22:15:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30473 invoked from network); 8 Mar 2006 22:15:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2006 22:15:10 -0000 X-Host-Fingerprint: 212.27.42.35 smtp5-g19.free.fr Linux 2.5 (sometimes 2.4) (4) Received: from ([212.27.42.35:58205] helo=smtp5-g19.free.fr) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id E7/BB-27106-E675F044 for ; Wed, 08 Mar 2006 17:15:10 -0500 Received: from [192.168.0.3] (lns-bzn-19-82-248-173-163.adsl.proxad.net [82.248.173.163]) by smtp5-g19.free.fr (Postfix) with ESMTP id EEFB12465D; Wed, 8 Mar 2006 21:15:17 +0100 (CET) Message-ID: <440F3CAB.7000506@toggg.com> Date: Wed, 08 Mar 2006 21:20:59 +0100 User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dmitry Stogov CC: internals@lists.php.net 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 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