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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
My vote: (1) +0.5, (4) +0.5
Thanks. Dmitry.
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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
5) goto, fowarding-jumping only.
- Sascha
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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
5) goto, fowarding-jumping only.
Yes I agree with that if you mean by forwarding: down and out of scope
only (not into loop constructs). I would assume you mean that though.
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org
Sascha Schumann wrote:
5) goto, fowarding-jumping only.
which would more or less make it useless for state machine stuff, right?
--
Hartmut Holzgraefe, Senior Support Engineer .
MySQL AB, www.mysql.com
Join me at MySQL's 2006 Users Conference, April 24-27!
http://www.mysqluc.com/
Dmitry Stogov wrote:
Please reviw and vote.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
- +1
Edin
Dmitry Stogov wrote:
- goto and break label
+0
- break label only (like Java)
+1
Regards,
Michael - <mike(@)php.net> http://dev.iworks.at/ext-http/http-functions.html.gz
Michael Wallner wrote:
Dmitry Stogov wrote:
- goto and break label
+0
- 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 and the loop to be executed again. I
realize all the Java folks have gotten used to this, but I don't think I
ever will.
-Rasmus
Rasmus Lerdorf wrote:
Michael Wallner wrote:
Dmitry Stogov wrote:
- goto and break label
+0
- 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 and the loop to be executed again. I
realize all the Java folks have gotten used to this, but I don't think I
ever will.
Yes, but it's quite obvious to me if I replace the labeled break with break 1;
I'd expect continue label;
to step into the loop again.
By the way, +0 does not mean -1 for goto.
Regards,
Michael - <mike(@)php.net> http://dev.iworks.at/ext-http/http-functions.html.gz
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
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115
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 languages shouldn't be like C and PHP has plenty of
stuff that looks nothing like C, but like it or not, a lot of PHP's
syntax came from C and I don't think we should be adding syntax that
looks like something from C but doesn't act like it.
I still think this is a really fringe feature that isn't worth one of
the first forward compatibility breaks in the procedural language in years.
-Rasmus
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 me that
PHP has something from Perl too... Of course, the question is how much of
each we want, but I guess that's a matter of tastes.
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115
Michael Wallner wrote:
- break label only (like Java)
+1You 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 and the loop to be executed again. I realize all the
Java folks have gotten used to this, but I don't think I ever will.
Nor would I... this is a "NONO" for me.
Derick
Rasmus Lerdorf wrote:
Michael Wallner wrote:
Dmitry Stogov wrote:
- goto and break label
+0
- break label only (like Java)
+1You 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 and the loop to be executed again. I
realize all the Java folks have gotten used to this, but I don't think I
ever will.-Rasmus
If we do both goto and labeled breaks you can get your expected
behaviour with:
label:
while(condition) {
goto label;
}
right? Using break in the un-expected way together with goto gives you
both options.
FWIW (And that's probably not much ;) ) my vote would be:
- 1 (goto and break label)
- 0
- 0
- 0
Bart
DS>>1) goto and break label
DS>>2) goto only (like C)
DS>>3) break label only (like Java)
DS>>4) nothing
- +0.5 2) -1 3) +1
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115
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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
- +0.5
- +0.5
--
Wbr,
Antony Dovgal
- goto and break label
+1
I'm happy with goto, but don't mind getting labelled breaks "for
free"; labels are better than numbers.
- goto only (like C)
+1
- break label only (like Java)
+0.5, but only if we don't have goto
--Wez.
- goto and break label
+1I'm happy with goto, but don't mind getting labelled breaks "for
free"; labels are better than numbers.
same here +1
- goto only (like C)
+1
- break label only (like Java)
+0.5, but only if we don't have goto
+0
--Pierre
At 11:28 07/03/2006, 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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
My vote: (1) +0.5, (4) +0.5
(3) +0.5
(4) +1
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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
thanks for this thread.
+0.5 for goto
+1 for "do { break label; } while(0); label:" (line label, same with goto)
or if the above is not acceptable, +0.5 for java like "label: do {
break label; } while(0);" (block label, confusing with goto)
Dmitry Stogov wrote:
- goto and break label
+1
- goto only (like C)
+1
- break label only (like Java)
-1
Ilia
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
Thanks for giving this a final chance, Dmitry.
- +0.5
- +1
- Steph
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
In Sean's words:
- 0
- 0
- 0
- 0
Sorry for the noise. I was told to vote.
Meaning, I don't care, never had a use for GOTO, but if the caring
majority thinks, it's needed, why not :)
chregu
--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | christian.stocker@bitflux.ch | GPG 0x5CE1DECB
Christian Stocker schrieb:
- 0
- 0
- 0
- 0
Sorry for the noise. I was told to vote.
Meaning, I don't care, never had a use for GOTO, but if the caring
majority thinks, it's needed, why not :)
Same here.
--
Sebastian Bergmann http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
Sorry for the noise. I was told to vote.
Meaning, I don't care, never had a use for GOTO, but if the caring
majority thinks, it's needed, why not :)chregu
same here.
- -1
- 0.5
- -1
- 0
Nuno
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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
For what it is worth:
- +0.5
- +1
- +0
- -1
I don't see any real benefit to break label as the deepest I have ever
seen is 3 levels of break. I have run up against too many situations
where the only way to lex something effectively in PHP is with pcre.
The ability to port a tool like re2c would make it far easier to do
things efficiently without having to write a new PHP extension. I doubt
any users will suddenly start peppering goto all over their source, I
just can't see that happening when there are so many other great loop
constructs available. Discouraging its use is easy - just make sure the
manual makes it really unattractive and has examples of better ways to
implement goto using for/foreach/while.
Greg
I'm with Rasmus on the break label stuff. Although it's not confusing
to me, I got convinced quickly that it'll be confusing to the wider
audience. So big -1 from me for (2) & (1).
I think we should either stick with nothing or go to a full goto
(without jumping into scopes of course). Only forward gotos would go
against one of the main initial motivations for discussing this which
was state machines.
I suggest we apply this and allow people to play around with it/test it....
Btw, how about naming it "jump" and not "goto"? :)
Andi
At 01:28 AM 3/7/2006, 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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
My vote: (1) +0.5, (4) +0.5
Thanks. Dmitry.
Andi Gutmans wrote:
I'm with Rasmus on the break label stuff. Although it's not confusing to
me, I got convinced quickly that it'll be confusing to the wider
audience. So big -1 from me for (2) & (1).
From your comment bellow I figure you're for option 2, right?
Edin
I think we should either stick with nothing or go to a full goto
(without jumping into scopes of course). Only forward gotos would go
against one of the main initial motivations for discussing this which
was state machines.I suggest we apply this and allow people to play around with it/test it....
Btw, how about naming it "jump" and not "goto"? :)
AndiAt 01:28 AM 3/7/2006, 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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
My vote: (1) +0.5, (4) +0.5
Thanks. Dmitry.
Yes 2. Sorrry
At 07:28 AM 3/7/2006, Edin Kadribasic wrote:
Andi Gutmans wrote:
I'm with Rasmus on the break label stuff. Although it's not confusing to
me, I got convinced quickly that it'll be confusing to the wider
audience. So big -1 from me for (2) & (1).From your comment bellow I figure you're for option 2, right?
Edin
I think we should either stick with nothing or go to a full goto
(without jumping into scopes of course). Only forward gotos would go
against one of the main initial motivations for discussing this which
was state machines.I suggest we apply this and allow people to play around with it/test it....
Btw, how about naming it "jump" and not "goto"? :)
AndiAt 01:28 AM 3/7/2006, 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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
My vote: (1) +0.5, (4) +0.5
Thanks. Dmitry.
Dmitry Stogov wrote:
- goto and break label
+0.5
- goto only (like C)
+1
- break label only (like Java)
-1
Rob
- goto and break label
+0
Making goto's labels work with break is cheap, but less vital than goto.
- goto only (like C)
+1
Within scope and out of break context is a given. My preference is to not
limit jumping to forward only, though such a limit would still be a step in
the right direction.
- break label only (like Java)
0
See #1
- nothing
-1
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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
My vote: (1) +0.5, (4) +0.5
Thanks. Dmitry.
--
- +0
- +1
- -1
- -1
I personally think labelled breaks are more fluff than anything. Like
Greg I just haven't seen any examples of trying to break out of more
than 3 loops in live code and I only recall seeing that once.
Hi,
- goto and break label
+1- goto only (like C)
+1- break label only (like Java)
-1- nothing
-1
Regards,
Magnus "Currently 'a bit' inactive" Määttä
(2) +1e10
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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
My vote: (1) +0.5, (4) +0.5
Thanks. Dmitry.
<tests.tar.gz
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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
- +1
What's the policy on voting btw? Am I allowed?
Cheers,
Rob.
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
At 09:50 AM 3/7/2006, Robert Cummings 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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
- +1
What's the policy on voting btw? Am I allowed?
Sure you can vote. Doesn't mean we'll listen to you though :)
Andi
At 09:50 AM 3/7/2006, Robert Cummings 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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
- +1
What's the policy on voting btw? Am I allowed?
Sure you can vote. Doesn't mean we'll listen to you though :)
That's better then nothing. At least I feel included ;)
Cheers,
Rob.
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
if($choice == 1) {
goto bad;
} else if ($choice == 2) {
goto good;
} else if ($choice == 3) {
goto bad;
} else if ($choice == 4) {
goto good;
}
good:
$vote++;
bad:
return;
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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
- +1
What's the policy on voting btw? Am I allowed?
Cheers,
Rob..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
if($choice == 1) {
goto bad;
} else if ($choice == 2) {
goto good;
} else if ($choice == 3) {
goto bad;
} else if ($choice == 4) {
goto good;
}good:
$vote++;
bad:
return;
I don't remember, but I think Sarah Golemon allowed for it in one of her
patches way back:
<?php
$map = array
(
1 => 'bad',
2 => 'good',
3 => 'bad',
4 => 'acceptable',
);
goto $map[$choice];
good:
vote += .5;
acceptable:
vote += .5;
bad:
return;
?>
For the record, I wouldn't normally fall through like that, but we're
just having fun :B
Cheers,
Rob.
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
Hi,
I don't remember, but I think Sarah Golemon allowed for it in one of her
patches way back:<?php
$map = array
(
1 => 'bad',
2 => 'good',
3 => 'bad',
4 => 'acceptable',
);goto $map[$choice];
NOOO - If we add goto only with static labels. Everything else is a total
mess.
johannes
I don't remember, but I think Sarah Golemon allowed for it in one of her
patches way back:goto $map[$choice];
Yes, and targeting dynamic labels was one of the first big sacrifices on the
altar of compromise. Current implementation options use static,
compile-time resolved labels only.
-Sara (no h thank you)
I don't remember, but I think Sarah Golemon allowed for it in one of her
patches way back:goto $map[$choice];
Yes, and targeting dynamic labels was one of the first big sacrifices on the
altar of compromise. Current implementation options use static,
compile-time resolved labels only.
Yeah I remember that too -- vaguely (it's been a long time). Still,
dynamic labels were never very important IMHO.
-Sara (no h thank you)
My apologies, my wife's name is Sarah so the 'h' just seems to flow :)
Cheers,
Rob.
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
I took that as (2) +1, (4) +1.
Current raw totals amongst those who contribute to the PHP core: (1) +5.5,
(2) +9.5, (3) +0, (4) 2
Still to vote: Derick, Marcus, George, Sascha, Hartmut, Chregu, Johannes,
Sebastian, Stefan, apologies if I missed any names here.
Current raw totals amongst all votes: (1) +7.5, (2) +13, (3) +0.5, (4) 0
Still notably haven't heard from: Lukas, Nuno, Alan K, Sean...
----- Original Message -----
From: "John Coggeshall" john@coggeshall.org
To: "Robert Cummings" robert@interjinn.com
Cc: "Dmitry Stogov" dmitry@zend.com; internals@lists.php.net
Sent: Tuesday, March 07, 2006 7:58 PM
Subject: Re: [PHP-DEV] GOTO and/or BREAK LABEL
if($choice == 1) {
goto bad;
} else if ($choice == 2) {
goto good;
} else if ($choice == 3) {
goto bad;
} else if ($choice == 4) {
goto good;
}good:
$vote++;
bad:
return;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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
- +1
What's the policy on voting btw? Am I allowed?
Cheers,
Rob..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'--
__________ NOD32 1.1380 (20060125) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
Steph Fox wrote:
Still notably haven't heard from: Lukas, Nuno, Alan K, Sean...
- 0
- 0
- 0
- 0
Sorry for the noise. I was told to vote.
I don't personally have much use for goto, and I see both sides.
I also only run PHP on dedicated platforms, so if appropriate engine
mods were made (if necessary), and goto went into PECL that would be
best for me.
S
I took that as (2) +1, (4) +1.
Current raw totals amongst those who contribute to the PHP core: (1) +5.5, (2)
+9.5, (3) +0, (4) 2Still to vote: Derick, Marcus, George, Sascha, Hartmut, Chregu, Johannes,
Sebastian, Stefan, apologies if I missed any names here.
I think Sascha and I already did... anyway, I go:
(1) -1
(2) +1
(3) -1
(4) -1
Derick
Steph Fox wrote:
Still to vote: Derick, Marcus, George, Sascha, Hartmut, Chregu,
Johannes, Sebastian, Stefan, apologies if I missed any names here.
- -1
- +1
- +.5
- -0
--
Hartmut Holzgraefe, Senior Support Engineer .
MySQL AB, www.mysql.com
Join me at MySQL's 2006 Users Conference, April 24-27!
http://www.mysqluc.com/
Hi,
Current raw totals amongst those who contribute to the PHP core: (1) +5.5,
(2) +9.5, (3) +0, (4) 2Still to vote: Derick, Marcus, George, Sascha, Hartmut, Chregu, Johannes,
Sebastian, Stefan, apologies if I missed any names here.
Alright, my vote:
- -1
- +1
- -1
- 0
johannes
- +1
Since I can see it's use, and I've already seen 101 ways to write
spagetti code, so 102 ways isnt much different ;)
Regards
Alan
Steph Fox wrote:
I took that as (2) +1, (4) +1.
Current raw totals amongst those who contribute to the PHP core: (1)
+5.5, (2) +9.5, (3) +0, (4) 2Still to vote: Derick, Marcus, George, Sascha, Hartmut, Chregu,
Johannes, Sebastian, Stefan, apologies if I missed any names here.Current raw totals amongst all votes: (1) +7.5, (2) +13, (3) +0.5, (4) 0
Still notably haven't heard from: Lukas, Nuno, Alan K, Sean...
----- Original Message ----- From: "John Coggeshall"
john@coggeshall.org
To: "Robert Cummings" robert@interjinn.com
Cc: "Dmitry Stogov" dmitry@zend.com; internals@lists.php.net
Sent: Tuesday, March 07, 2006 7:58 PM
Subject: Re: [PHP-DEV] GOTO and/or BREAK LABELif($choice == 1) {
goto bad;
} else if ($choice == 2) {
goto good;
} else if ($choice == 3) {
goto bad;
} else if ($choice == 4) {
goto good;
}good:
$vote++;
bad:
return;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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- nothing
- +1
What's the policy on voting btw? Am I allowed?
Cheers,
Rob..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'--
__________ NOD32 1.1380 (20060125) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
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.
- goto and break label
+1
- goto only (like C)
+1
- break label only (like Java)
+1
- nothing
-1
regards,
Lukas
Hello Dmitry,
Tuesday, March 7, 2006, 10:28:27 AM, you 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.
- goto and break label
-1e307
- goto only (like C)
-1e307
- break label only (like Java)
given usable non confusing syntax i am ok
- nothing
+1
My vote: (1) +0.5, (4) +0.5
"If i want Spaghetti i cook some and don't brew unreadable and
unmaintainable php code. And if i write a parser or scanner i
use C and only C and nothing else. And besides the latter there
is need for the concept goto."
And well i am ignoring the rest of this :-)
Best regards,
Marcus
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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- 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
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.
- goto and break label
- goto only (like C)
- break label only (like Java)
- 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
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 everyone who had anything to
say on the matter already did so the first time(s) there won't even be any
point to it.
- Steph
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 ourselves think, and since everyone who had
anything to say on the matter already did so the first time(s) there
won't even be any point to it.
- Steph
If I could vote:
- goto and break label
-1- goto only (like C)
-0.5- break label only (like Java)
0- nothing
0.5
Please consider "break" and "continue" same in my vote
- is positive as acting against 1) and 2)
Regards
--
toggg
That's 'one man one vote' NOT 'one mail one vote' :)
----- Original Message -----
From: "bertrand Gugger" toggg@php.net
To: internals@lists.php.net; "Steph Fox" steph@zend.com
Cc: "Dmitry Stogov" dmitry@zend.com
Sent: Wednesday, March 08, 2006 11:57 PM
Subject: Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL
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 ourselves think, and since everyone who had
anything to say on the matter already did so the first time(s) there
won't even be any point to it.
- Steph
If I could vote:
- goto and break label
-1- goto only (like C)
-0.5- break label only (like Java)
0- nothing
0.5Please consider "break" and "continue" same in my vote
- is positive as acting against 1) and 2)
Regards
--
toggg--
__________ NOD32 1.1380 (20060125) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com