RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_compile.c zend_compile.hzend_globals.h zend_language_parser.y /tests break_label01.phpt
break_label02.phptbreak_label03.phpt break_label04.phpt break_label05.phpt break_label06.phpt

From: Date: Mon, 06 Mar 2006 07:19:50 +0000
Subject: RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_compile.c zend_compile.hzend_globals.h zend_language_parser.y /tests break_label01.phpt
break_label02.phptbreak_label03.phpt break_label04.phpt break_label05.phpt break_label06.phpt
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4675@lists.php.net to get a copy of this message
Hi Markus, > -----Original Message----- > From: Marcus Boerger [mailto:helly@php.net] > Sent: Sunday, March 05, 2006 2:22 PM > To: Dmitry Stogov > Cc: 'Andi Gutmans'; 'Rasmus Lerdorf'; Derick Rethans; > zend-engine-cvs@lists.php.net; Sara Golemon; 'Edin Kadribasic' > Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / > zend_compile.c zend_compile.hzend_globals.h > zend_language_parser.y /tests break_label01.phpt > break_label02.phptbreak_label03.phpt break_label04.phpt > break_label05.phpt break_label06.phpt > > > Hello Dmitry, > > Sunday, March 5, 2006, 11:46:38 AM, you wrote: > > > Guys, > > > The committed patch was posted into @iternals and discussed at > > December or January. It is not based on PDM's decision, and have > > nothing common with goto semantic. > > > THE PATCH REUSES JAVA SYNTAX AND SYMANTIC. > > But we are not Java and we don't want to be and we share > little Java syntax semantics. Actually only the keywords > 'interface' and 'final' and the fact that one has to specify > visibility for every member of a class. And all of those are > late additions to php in 5. For the rest of php we share c > syntax and semantics. Thus adding any of those strange java > workarounds makes out a very confusing php. Furthermore it > means that when adding some java syntax that exists in C/C++ > in a different way we head in a wrong direction. Reusing "break label" syntax with symantic that differ from Java and other languages will confuse much more people. I am speaking about PDM's decision. And C++ hasn't "break label" syntax so nothing to confuse. We already discussed this patch and nobody except Zeev was against it. I am not sure that PHP needs goto and I'll post my new patch to discuss it. Thanks. Dmitry. > > I am already developing real goto patch, that will able to > reuse same > > labels. And having two different syntaxes for label is stupid. > > I see little to no sense for goto in php besides being able > to write lexers and parser - but do you really want that? And > if so, who provides the code generators? When having goto > just for some laziness and easier eror handling then the only > thing we gain is support for writing unmaintainable spaghetti > code. (For my self i counted one of my projects i am > currently working on, it consists of close to 10 thousand > lines of code by me and there is a single goto and that is > there only for lazyness). > > However being able to break out of multiple loops is a nice > think when achivable by name aka label. If that requires goto > i would hate it but not prevent it. Confusing the syntax i > will always avoid. > > Best regards, > Marcus > > -- > Zend Engine CVS Mailing List (http://cvs.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.zend-engine.cvs (#4675) next »