True labelled breaks

php.internals

Steph

20 years ago
Guys and guyess, Sara and Dmitry's patch to introduce labelled breaks was discussed on internals@ ever-so-briefly at the beginning of December, but there was never any decision made over it. Given that practically everyone who survived the preceding GOTO discussion seemed to think it was a good idea at the time, could you please re-visit it, evaluate it, discuss it (as opposed to talking about GOTO, which is unrelated) and either OK it or put it to bed for once and for all? Relevant summary is at http://www.zend.com/zend/week/week265.php#Heading3 Relevant patch is at http://www.zend.com/zend/week/pat/index.php And if it's worth anything, +1 from me. - Steph

Ilia A.

20 years ago
I'll avoid re-iterating all of the comments I've said back in December and simply summarize by saying -1. Ilia

Steph

20 years ago
You talked a lot about goto at the time. You never even looked at this particular patch, just assumed it was something you'd already said 'no' to. Please take the time to look again. ----- Original Message ----- From: "Ilia Alshanetsky" <ilia@prohost.org> To: "Steph Fox" <steph@zend.com> Cc: "internals" <internals@lists.php.net> Sent: Saturday, February 18, 2006 9:07 PM Subject: Re: [PHP-DEV] True labelled breaks

Andi Gutmans

20 years ago
I think that in 1997 when break/continue n where implemented it would have been a nice idea, but at this stage except for being more elegant than break/continue n it doesn't truly add anything substantial to PHP (and as you already mentioned it's orthogonal to the goto discussion). I think having more than 1 way of doing the same thing, in this case, might just end up confusing people developing with PHP (i.e. the Perl way :) Just for the record I am coming at this from an open mind. Dmitry did spend time on this patch, etc... I'd recommend to bed it once and for all. At 09:16 AM 2/18/2006, Steph Fox wrote:

Steph

20 years ago
I personally find working with numbers difficult, which is why I'm wholly in support of this patch. I doubt I'm the only PHP user with that issue, due to the 'ease of use' that allows people with no history of computer science to write useful scripts (for which, thank you all). But I wouldn't expect a great deal of sympathy on that point from CS graduates. nb I think implementing goto/equivalent itself is a fairly bad idea - I appear to be in the minority on that issue. But I don't see any problem with introducing labels, I just see it as a more user-friendly way of allowing nested breaks. Am I very wrong? ----- Original Message ----- From: "Andi Gutmans" <andi@zend.com> To: "Steph Fox" <steph@zend.com>; "internals" <internals@lists.php.net> Sent: Saturday, February 18, 2006 9:30 PM Subject: Re: [PHP-DEV] True labelled breaks

Andi Gutmans

20 years ago
It's just something which to begin with isn't used that much. Grep'ed phpweb/ for it and found 0 occurrences of break n; and I believe the people developing it would be the ones who would know how to use it. Andi At 02:33 PM 2/18/2006, Steph Fox wrote:

Steph

20 years ago
Agreed it's not used very much. That's because people like me think it's scary :) and that's _exactly_ what I was trying to say. ----- Original Message ----- From: "Andi Gutmans" <andi@zend.com> To: "Steph Fox" <steph@zend.com>; "internals" <internals@lists.php.net> Sent: Sunday, February 19, 2006 12:48 AM Subject: Re: [PHP-DEV] True labelled breaks

Andi Gutmans

20 years ago
Yeah but my point was that even people for who it isn't scary (the devs) don't use it very much :) It's just something which isn't needed very often. So we're wasting lots of bandwidth on something which not many will use anyway :) Andi At 02:54 PM 2/18/2006, Steph Fox wrote:

Steph

20 years ago
Erm - I'd consider myself one of 'the devs' as far as that goes. Perhaps I wasn't very clear. There is a feature in PHP that could easily be made more user-friendly, and we have before us a patch that could do that. I'm failing to understand why it's problematic to use it. ----- Original Message ----- From: "Andi Gutmans" <andi@zend.com> To: "Steph Fox" <steph@zend.com>; "internals" <internals@lists.php.net> Sent: Sunday, February 19, 2006 12:56 AM Subject: Re: [PHP-DEV] True labelled breaks

Andi Gutmans

20 years ago
Argh, re-read my first email. I gave my reasoning there... At 03:11 PM 2/18/2006, Steph Fox wrote:

Steph

20 years ago
Your chief argument was that having two ways to do things is intrinsically perl-ish and un-PHP-like. My chief argument is that the single existing way isn't user-friendly. Your secondary argument was that nested breaks are rarely used in PHP anyway. I think your secondary argument is directly related to my chief argument. Is all, I'll quit now. If nobody on the dev team cares about it any more (despite the fact that all of them liked the idea at the time save Ilia and Jani) then it's going nowhere anyway. - Steph ----- Original Message ----- From: "Andi Gutmans" <andi@zend.com> To: "Steph Fox" <steph@zend.com>; "internals" <internals@lists.php.net> Sent: Sunday, February 19, 2006 1:14 AM Subject: Re: [PHP-DEV] True labelled breaks

Derick Rethans

20 years ago
Perhaps not many will use it, that doesn't mean it's useful. I don't have much use of the Reflection stuff either, nor do I see its general usefulness. That doesn't mean I am against having it in PHP because it is useful. In the previous thread we already saw where the labelled break was useful, and I would like to see the proposed patch committed. Derick On Sat, 18 Feb 2006, Andi Gutmans wrote:
> Yeah but my point was that even people for who it isn't scary (the devs) don't > use it very much :) It's just something which isn't needed very often. So > we're wasting lots of bandwidth on something which not many will use anyway :) > > Andi > > At 02:54 PM 2/18/2006, Steph Fox wrote: > >Agreed it's not used very much. That's because people like me think it's > >scary :) and that's _exactly_ what I was trying to say. > > > >----- Original Message ----- From: "Andi Gutmans" <andi@zend.com> > >To: "Steph Fox" <steph@zend.com>; "internals" <internals@lists.php.net> > >Sent: Sunday, February 19, 2006 12:48 AM > >Subject: Re: [PHP-DEV] True labelled breaks > > > > > > >It's just something which to begin with isn't used that much. > > >Grep'ed phpweb/ for it and found 0 occurrences of break n; and I believe > > >the people developing it would be the ones who would know how to use it. > > > > > >Andi > > > > > >At 02:33 PM 2/18/2006, Steph Fox wrote: > > > >I personally find working with numbers difficult, which is why I'm wholly > > > >in support of this patch. > > > > > > > >I doubt I'm the only PHP user with that issue, due to the 'ease of use' > > > >that allows people with no history of computer science to write useful > > > >scripts (for which, thank you all). But I wouldn't expect a great deal of > > > >sympathy on that point from CS graduates. > > > > > > > >nb I think implementing goto/equivalent itself is a fairly bad idea - I > > > >appear to be in the minority on that issue. But I don't see any problem > > > >with introducing labels, I just see it as a more user-friendly way of > > > >allowing nested breaks. > > > > > > > >Am I very wrong? > > > > > > > > > > > >----- Original Message ----- From: "Andi Gutmans" <andi@zend.com> > > > >To: "Steph Fox" <steph@zend.com>; "internals" <internals@lists.php.net> > > > >Sent: Saturday, February 18, 2006 9:30 PM > > > >Subject: Re: [PHP-DEV] True labelled breaks > > > > > > > > > > > > >I think that in 1997 when break/continue n where implemented it would > > > > >have been a nice idea, but at this stage except for being more elegant > > > > >than break/continue n it doesn't truly add anything substantial to PHP > > > > >(and as you already mentioned it's orthogonal to the goto discussion). > > > > >I think having more than 1 way of doing the same thing, in this case, > > > > >might just end up confusing people developing with PHP (i.e. the Perl > > > > >way :) > > > > > > > > > >Just for the record I am coming at this from an open mind. Dmitry did > > > > >spend time on this patch, etc... > > > > > > > > > >I'd recommend to bed it once and for all. > > > > > > > > > >At 09:16 AM 2/18/2006, Steph Fox wrote: > > > > > >Guys and guyess, > > > > > > > > > > > >Sara and Dmitry's patch to introduce labelled breaks was discussed on > > > > > >internals@ ever-so-briefly at the beginning of December, but there > > > > > >was never any decision made over it. > > > > > > > > > > > >Given that practically everyone who survived the preceding GOTO > > > > > >discussion seemed to think it was a good idea at the time, could you > > > > > >please re-visit it, evaluate it, discuss it (as opposed to talking > > > > > >about GOTO, which is unrelated) and either OK it or put it to bed for > > > > > >once and for all? > > > > > > > > > > > >Relevant summary is at > > > > > >http://www.zend.com/zend/week/week265.php#Heading3 > > > > > >Relevant patch is at http://www.zend.com/zend/week/pat/index.php > > > > > > > > > > > >And if it's worth anything, +1 from me. > > > > > > > > > > > >- Steph > > > > > >-- > > > > > >PHP Internals - PHP Runtime Development Mailing List > > > > > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > >-- > > > > >PHP Internals - PHP Runtime Development Mailing List > > > > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > >>>>__________ NOD32 1.1380 (20060125) Information __________ > > > > > > > > > >This message was checked by NOD32 antivirus system. > > > > >http://www.eset.com > > > > > >-- > > >PHP Internals - PHP Runtime Development Mailing List > > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > >>__________ NOD32 1.1380 (20060125) Information __________ > > > > > >This message was checked by NOD32 antivirus system. > > >http://www.eset.com > > > > >
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Andi Gutmans

20 years ago
As I said, the syntax is quite elegant and the patch isn't too bad either. However, I do suggest we only add it if people are really convinced that it'll be used. Reflection falls into a different category in my opinion, because it actually allows you to do stuff you couldn't really do before... It's a bad comparison. Andi At 03:53 PM 2/18/2006, Derick Rethans wrote:

Derick Rethans

20 years ago
On Sat, 18 Feb 2006, Andi Gutmans wrote:
> As I said, the syntax is quite elegant and the patch isn't too bad either. > However, I do suggest we only add it if people are really convinced that it'll > be used.
I will use it. << that good enough? :) But seriously, I have quite a few cases where I would use it if it was available. regards, Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Hartmut Holzgraefe

20 years ago
Derick Rethans wrote:
> I will use it. << that good enough? :) But seriously, I have quite a few > cases where I would use it if it was available.
same here ... i tried to avoid the current "break n;" where ever possible as it is easy to run into a maintainance nightmare with it (renumbering! this is so 80ies BASIC ...), so i tend to use flag variables instead in cases where i need to terminate several nested loops. labeled breaks are *so* much better/cleaner than both approaches above that i'd really love to have them ... IMHO "break n;" is even more evil than "goto label;", it is almost in the same league as "goto linenumber;" ...
-- Hartmut Holzgraefe, Senior Support Engineer . MySQL AB, www.mysql.com

Wez Furlong

20 years ago
I think not many people use it because it's difficult to use. Having real labels might change that. Personally, I'd prefer real goto, as I've stated in the past. Just for the record again, I'm +1 for goto, and +0.5 for labelled breaks only if we've totally given up on goto. --Wez. On 2/18/06, Andi Gutmans <andi@zend.com> wrote:

Steph

20 years ago
Wez, that patch allows for the possibility of a future 'goto' (which it calls 'jump'). It just doesn't implement it... ----- Original Message ----- From: "Wez Furlong" <kingwez@gmail.com> To: "Andi Gutmans" <andi@zend.com> Cc: "Steph Fox" <steph@zend.com>; "internals" <internals@lists.php.net> Sent: Monday, February 20, 2006 1:09 AM Subject: Re: [PHP-DEV] True labelled breaks I think not many people use it because it's difficult to use. Having real labels might change that. Personally, I'd prefer real goto, as I've stated in the past. Just for the record again, I'm +1 for goto, and +0.5 for labelled breaks only if we've totally given up on goto. --Wez. On 2/18/06, Andi Gutmans <andi@zend.com> wrote:

Hartmut Holzgraefe

20 years ago
Wez Furlong wrote:
> I think not many people use it because it's difficult to use. > Having real labels might change that. > Personally, I'd prefer real goto, as I've stated in the past. > Just for the record again, I'm +1 for goto, and +0.5 for labelled > breaks only if we've totally given up on goto.
FULLACK
-- Hartmut Holzgraefe, Senior Support Engineer . MySQL AB, www.mysql.com

Lukas Smith

20 years ago
Hartmut Holzgraefe wrote:
> Wez Furlong wrote: >> I think not many people use it because it's difficult to use. >> Having real labels might change that. >> Personally, I'd prefer real goto, as I've stated in the past. >> Just for the record again, I'm +1 for goto, and +0.5 for labelled >> breaks only if we've totally given up on goto. > > FULLACK
+1 regards, Lukas

Zeev Suraski

20 years ago
At 13:43 20/02/2006, Lukas Smith wrote:
>Hartmut Holzgraefe wrote: >>Wez Furlong wrote: >>>I think not many people use it because it's difficult to use. >>>Having real labels might change that. >>>Personally, I'd prefer real goto, as I've stated in the past. >>>Just for the record again, I'm +1 for goto, and +0.5 for labelled >>>breaks only if we've totally given up on goto. >>FULLACK > >+1
No news, -1 to that, +0 to the decision in the Paris meeting. Zeev

Derick Rethans

20 years ago
On Mon, 20 Feb 2006, Lukas Smith wrote:
> Hartmut Holzgraefe wrote: > > Wez Furlong wrote: > > > I think not many people use it because it's difficult to use. > > > Having real labels might change that. > > > Personally, I'd prefer real goto, as I've stated in the past. > > > Just for the record again, I'm +1 for goto, and +0.5 for labelled > > > breaks only if we've totally given up on goto. > > > > FULLACK > > +1
Same here, +1 on full goto. And if not then the PDM result. Labelled breaks are inadequate IMO. Derick

Steph

20 years ago
>> Hartmut Holzgraefe wrote: >> > Wez Furlong wrote: >> > > I think not many people use it because it's difficult to use. >> > > Having real labels might change that. >> > > Personally, I'd prefer real goto, as I've stated in the past. >> > > Just for the record again, I'm +1 for goto, and +0.5 for labelled >> > > breaks only if we've totally given up on goto. >> > >> > FULLACK >> >> +1 > > Same here, +1 on full goto. And if not then the PDM result. Labelled > breaks are inadequate IMO.
One more time: labelled breaks weren't offered as an _alternative_ to goto. Why are you bringing this to the forum now? - Steph

Derick Rethans

20 years ago
On Tue, 21 Feb 2006, Steph Fox wrote:
> > > Hartmut Holzgraefe wrote: > > > > Wez Furlong wrote: > > > > > I think not many people use it because it's difficult to use. > > > > > Having real labels might change that. > > > > > Personally, I'd prefer real goto, as I've stated in the past. > > > > > Just for the record again, I'm +1 for goto, and +0.5 for labelled > > > > > breaks only if we've totally given up on goto. > > > > > > > > FULLACK > > > > > > +1 > > > > Same here, +1 on full goto. And if not then the PDM result. Labelled > > breaks are inadequate IMO. > > One more time: labelled breaks weren't offered as an _alternative_ to goto. > Why are you bringing this to the forum now?
I am replying to the thread? Is that an offensive or something? Derick

Wez Furlong

20 years ago
On 2/21/06, Steph Fox <steph@zend.com> wrote:
> One more time: labelled breaks weren't offered as an _alternative_ to goto. > Why are you bringing this to the forum now?
Because it's a valid part of the discussion. --Wez.

Robert Cummings

20 years ago
In a previous email Steph Fox writes:
> > could you please re-visit it, evaluate it, discuss it (as opposed > to talking about GOTO, which is unrelated)
Then in this email Steph Fox writes:
> > nb I think implementing goto/equivalent itself is a fairly bad idea
Says the mouth to the foot, "Pleased to meet you!" 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. | `------------------------------------------------------------'

Steph

20 years ago
> In a previous email Steph Fox writes: >> >> could you please re-visit it, evaluate it, discuss it (as opposed >> to talking about GOTO, which is unrelated) > > Then in this email Steph Fox writes: >> >> nb I think implementing goto/equivalent itself is a fairly bad idea > > Says the mouth to the foot, "Pleased to meet you!"
And if you bothered to look into it, you'd know exactly why I wrote both things. Please don't waste any more bandwidth than I'm apparently wasting already :)

Kevin Waterson

20 years ago
This one time, at band camp, "Steph Fox" <steph@zend.com> wrote:
> Given that practically everyone who survived the preceding GOTO discussion > seemed to think it was a good idea at the time, could you please re-visit > it, evaluate it, discuss it (as opposed to talking about GOTO, which is > unrelated) and either OK it or put it to bed for once and for all?
Seems to be 3rd wheel Also steph, I cannot mail you @zend.com, I get user unknown error Kind regards Kevin
-- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote."

Steph

20 years ago
> Seems to be 3rd wheel > Also steph, I cannot mail you @zend.com, I get user unknown error
Everyone else's mail comes through OK, so I think that was probably a temporary issue. No idea what '3rd wheel' means... - Steph

Kevin Waterson

20 years ago
This one time, at band camp, "Steph Fox" <steph@zend.com> wrote:
> > Seems to be 3rd wheel > > Also steph, I cannot mail you @zend.com, I get user unknown error > > Everyone else's mail comes through OK, so I think that was probably a > temporary issue. > > No idea what '3rd wheel' means...
By a 3rd wheel (maybe its an aussie expression) I mean there is already the same thing in operation already and doing the job well. Any thing extra would (like another wheel) is superfluous. Kind regards Kevin
-- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote."

Steph

20 years ago
OK, but there's the option to have two wheels that you don't understand intuitively or two wheels that you do, and I'm hoping for the two that make sense to me :) ----- Original Message ----- From: "Kevin Waterson" <kevin@oceania.net> To: <internals@lists.php.net> Sent: Sunday, February 19, 2006 12:13 AM Subject: Re: [PHP-DEV] True labelled breaks