Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36800 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50355 invoked from network); 4 Apr 2008 10:41:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Apr 2008 10:41:17 -0000 Authentication-Results: pb1.pair.com header.from=jani.taskinen@sci.fi; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=jani.taskinen@sci.fi; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sci.fi from 63.208.196.179 cause and error) X-PHP-List-Original-Sender: jani.taskinen@sci.fi X-Host-Fingerprint: 63.208.196.179 mho-02-bos.mailhop.org Received: from [63.208.196.179] ([63.208.196.179:50910] helo=mho-02-bos.mailhop.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/53-31908-BC506F74 for ; Fri, 04 Apr 2008 05:41:16 -0500 Received: from [81.22.163.71] (helo=[10.6.109.198]) by mho-02-bos.mailhop.org with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.68) (envelope-from ) id 1JhjM9-000DEV-1C; Fri, 04 Apr 2008 10:41:13 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 81.22.163.71 X-Report-Abuse-To: abuse@dyndns.com (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19HKXXCg34ERowbhtPO6nKpb8GJAKn8Rj0= Reply-To: jani.taskinen@iki.fi To: Arvids Godjuks Cc: Alexey Zakhlestin , PHP internals In-Reply-To: <9b3df6a50804040335pc001765r5e0fa641a0edfc99@mail.gmail.com> References: <9b3df6a50804040143k519e4269vb11c9546a289ce1d@mail.gmail.com> <9b3df6a50804040335pc001765r5e0fa641a0edfc99@mail.gmail.com> Content-Type: text/plain Date: Fri, 04 Apr 2008 13:41:06 +0300 Message-ID: <1207305666.22702.0.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] The "jump" operator From: jani.taskinen@sci.fi (Jani Taskinen) You're about year too late..or even more. Please, don't just this discussion now. --Jani On Fri, 2008-04-04 at 13:35 +0300, Arvids Godjuks wrote: > Well, why even add such functionality if it's doubtful it will be used. It > just ads confusion and anger to users, who knows what it does and what harm > can be done. GOTO functionality wasn't present in PHP and i think should > never be ever. break is fine.. > > 2008/4/4, Alexey Zakhlestin : > > > > On Fri, Apr 4, 2008 at 1:17 PM, Arvids Godjuks > > wrote: > > > just emotions, sorry. > > > > > > But why you didn't keep the "break [1,2,3];" ? That was fine and > > > understandable and it was limited to loops, but with this will make code > > > messy, especially with if statements. I personally woun't use it at all, > > but > > > it will be hell to get into badly coded projects with "jump"'s in it. > > And it > > > was easily done with try/catch. > > > > > > break [1,2,3] is still there > > > > the following was removed > > > > $i = 2; > > break $i; > > > > while I, personnaly, agree, that for error-handling situations > > try/catch is a superior solution, the new "goto" construct can be > > useful for micro-optimizations > > I doubt, I will be using it, though :-) > > > > p.s. you replied me offlist. you should "cc" it, if you want to keep > > discussion running > > > > > > > 2008/4/4, Alexey Zakhlestin : > > > > > > > On Fri, Apr 4, 2008 at 12:43 PM, Arvids Godjuks > > > > wrote: > > > > > Link: http://news.php.net/php.internals/36536 > > > > > One question - are you crazy? I heared about break with goto > > > capabilities - > > > > > that's understandable - you could break 2 or 3 level loops, but > > this > > > one > > > > > shit. > > > > > > > > > > > > Could you please keep polite language? > > > > Details of this construct were known for quite a long time, and it was > > > > available in PHP6 for "ages" > > > > > > > > it is a limited goto, just as advertised. you can get out of blocks > > > > with it, but you can't go into blocks > > > > > > > > > > > > -- > > > > Alexey Zakhlestin > > > > http://blog.milkfarmsoft.com/ > > > > > > > > > > > > -- > > > > Alexey Zakhlestin > > http://blog.milkfarmsoft.com/ > > -- Patches/Donations: http://pecl.php.net/~jani/