Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-10 Thread Wez Furlong
or "goto: goto jump" On 3/9/06, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > For such people we might have a page in the manual saying: > goto: see jump -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-10 Thread Pierre
On Fri, 10 Mar 2006 10:07:46 +0100 [EMAIL PROTECTED] (Bastian Grupe) wrote: > Steph Fox wrote: > > Zeev's > > nightmare scenario re new users and spaghetti code has a good > > chance of coming true. It's the one command just about everyone's > > heard of. > > > > - Steph > > If you look at the

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-10 Thread Bastian Grupe
Steph Fox wrote: Zeev's nightmare scenario re new users and spaghetti code has a good chance of coming true. It's the one command just about everyone's heard of. - Steph If you look at the scripts in the wild, this scenario is already very present and one of the reasons things like register

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Zeev Suraski
At 22:43 09/03/2006, Lester Caine wrote: Zeev Suraski wrote: You are back to the main problem, you cannot educate people by keeping them away from the "dangerous" functions. Uhm, of course you can. Avoiding problems is by far the best way of solving them. But it has nothing to do with our to

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Lester Caine
Zeev Suraski wrote: You are back to the main problem, you cannot educate people by keeping them away from the "dangerous" functions. Uhm, of course you can. Avoiding problems is by far the best way of solving them. But it has nothing to do with our topic. So can we have a 'disable' switch

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Steph Fox
The reason for using jump is "because it is not a full analog of C's goto statement". It's my guess that experienced developers will want to lookup what the behaviour in PHP is. Cool. You just gave an excellent argument for not calling it 'goto' :) Seriously, the manual entry will probably use

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Bart de Boer
Steph Fox wrote: If someone is searching for "goto" he/she most likely knows what he/she is looking for. So this also helps experienced developers who are new to PHP. An experienced developer would know how to use it...! That was kind of the point. - Steph The reason for using jump is "bec

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Steph Fox
If someone is searching for "goto" he/she most likely knows what he/she is looking for. So this also helps experienced developers who are new to PHP. An experienced developer would know how to use it...! That was kind of the point. - Steph -- PHP Internals - PHP Runtime Development Mailing L

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Bart de Boer
Steph Fox wrote: BdB>>Even though I like "jump", people will most likely be searching for BdB>>"goto" (PHP manual) or "goto PHP" (Google) when they're trying to BdB>>find out if PHP has such a functionality. So, maybe it's better to BdB>>just call it "goto". For such people we might have a page

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Zeev Suraski
At 19:37 09/03/2006, Pierre wrote: On 3/9/06, Steph Fox <[EMAIL PROTECTED]> wrote: > > BdB>>Even though I like "jump", people will most likely be searching for > > BdB>>"goto" (PHP manual) or "goto PHP" (Google) when they're trying to > > BdB>>find out if PHP has such a functionality. So, maybe i

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Stanislav Malyshev
SF>>Erm, wouldn't those people who need to refer to the manual be exactly the SF>>same people we wanted to protect from goto in the first place? :) OK, make it: goto: you don't really want to use it, but if you are still curious, see "jump". -- Stanislav Malyshev, Zend Products Engineer [EMAIL

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Pierre
On 3/9/06, Steph Fox <[EMAIL PROTECTED]> wrote: > > BdB>>Even though I like "jump", people will most likely be searching for > > BdB>>"goto" (PHP manual) or "goto PHP" (Google) when they're trying to > > BdB>>find out if PHP has such a functionality. So, maybe it's better to > > BdB>>just call it "

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Steph Fox
BdB>>Even though I like "jump", people will most likely be searching for BdB>>"goto" (PHP manual) or "goto PHP" (Google) when they're trying to BdB>>find out if PHP has such a functionality. So, maybe it's better to BdB>>just call it "goto". For such people we might have a page in the manual sayi

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Sara Golemon
Even though I like "jump", people will most likely be searching for "goto" (PHP manual) or "goto PHP" (Google) when they're trying to find out if PHP has such a functionality. So, maybe it's better to just call it "goto". Agreed. As the man said this morning, let's "Consider our Audience". "G

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Stanislav Malyshev
BdB>>Even though I like "jump", people will most likely be searching for BdB>>"goto" (PHP manual) or "goto PHP" (Google) when they're trying to BdB>>find out if PHP has such a functionality. So, maybe it's better to BdB>>just call it "goto". For such people we might have a page in the manual sa

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Derick Rethans
On Thu, 9 Mar 2006, Bart de Boer wrote: > Even though I like "jump", people will most likely be searching for "goto" > (PHP manual) or "goto PHP" (Google) when they're trying to find out if PHP has > such a functionality. So, maybe it's better to just call it "goto". > > PHP will give some kind o

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL (conclusion)

2006-03-09 Thread Pierre
On Thu, 9 Mar 2006 11:03:48 +0300 [EMAIL PROTECTED] ("Dmitry Stogov") wrote: > Hi, > > The solution (2) - "goto only" is the winner. > So in case of no serious objections, I'll commit the "goto.diff" > patch in 24 hour. > > The last question: > What do you thin about Andi's solution about using "j

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-08 Thread Steph Fox
That's 'one man one vote' NOT 'one mail one vote' :) - Original Message - From: "bertrand Gugger" <[EMAIL PROTECTED]> To: ; "Steph Fox" <[EMAIL PROTECTED]> Cc: "Dmitry Stogov" <[EMAIL PROTECTED]> Sent: Wednes

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-08 Thread bertrand Gugger
Steph Fox wrote: I'm not concerned by the vote. Please, Bertrand, the goto/labelled breaks discussions were held ad infinitum last June, and back in December, and again more recently. The _only_ concern now is the vote. Anything else will lead to so much noise on here we can't hear ourselve

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-08 Thread Steph Fox
I'm not concerned by the vote. Please, Bertrand, the goto/labelled breaks discussions were held ad infinitum last June, and back in December, and again more recently. The _only_ concern now is the vote. Anything else will lead to so much noise on here we can't hear ourselves think, and since

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-08 Thread Bart de Boer
Rasmus Lerdorf wrote: Michael Wallner wrote: Dmitry Stogov wrote: 1) goto and break label +0 3) break label only (like Java) +1 You do realize that this is: label: while(condition) { break label; } As a C programmer this confuses me to no end. When I see "label:" I expect c

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-07 Thread Stanislav Malyshev
RL>>I still think this is a really fringe feature that isn't worth one of RL>>the first forward compatibility breaks in the procedural language in RL>>years. For the record, I'm happy even without either feature :) but I remember labeled break was quite useful for me in Perl - and it seems to m

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-07 Thread Sara Golemon
label_a: $i=0; label_b: $i++; while($i<10) { if(foo()) continue label_b; else { if(bar($i++)) goto label_a; } } And that would be a parse error. break/continue label only works when the label IMMEDIATELY preceeds the loop construct thus saying "I identify th

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-07 Thread Rasmus Lerdorf
Dmitry Stogov wrote: Rasmus, C hasn't "break label;", and I don't understand why Java way confising C people. It is clear and fit into structured programming. But the thing doesn't say: this-is-a-break-label label: It just says: label: Which would lead me to write something like: label

RE: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-07 Thread Dmitry Stogov
2006 7:09 PM > To: Stanislav Malyshev > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL > > > Stanislav Malyshev wrote: > > RL>>As a C programmer this confuses me to no end. When I > see "label:" > > RL>>I expe

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-07 Thread Rasmus Lerdorf
Stanislav Malyshev wrote: RL>>As a C programmer this confuses me to no end. When I see "label:" I expect The question is should all languages be like C? So, C has it that way, and Java and Perl have it other way. We don't move to prefix notation because Forth has it ;) No, obviously all lan

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-07 Thread Derick Rethans
On Tue, 7 Mar 2006, Rasmus Lerdorf wrote: > Michael Wallner wrote: > > > 3) break label only (like Java) > > +1 > > You do realize that this is: > > label: > while(condition) { >break label; > } > > As a C programmer this confuses me to no end. When I see "label:" I expect > control

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-07 Thread Stanislav Malyshev
RL>>As a C programmer this confuses me to no end. When I see "label:" I expect The question is should all languages be like C? So, C has it that way, and Java and Perl have it other way. We don't move to prefix notation because Forth has it ;) -- Stanislav Malyshev, Zend Products Engineer [EM

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-07 Thread Michael Wallner
Rasmus Lerdorf wrote: Michael Wallner wrote: Dmitry Stogov wrote: 1) goto and break label +0 3) break label only (like Java) +1 You do realize that this is: label: while(condition) { break label; } As a C programmer this confuses me to no end. When I see "label:" I expe

Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL

2006-03-07 Thread Rasmus Lerdorf
Michael Wallner wrote: Dmitry Stogov wrote: 1) goto and break label +0 3) break label only (like Java) +1 You do realize that this is: label: while(condition) { break label; } As a C programmer this confuses me to no end. When I see "label:" I expect control to end up there