# True labelled breaks

- Thread: https://externals.io/message/21912
- Original archive: https://news-web.php.net/php.internals/21912
- Started by Steph Fox on 2006-02-18T17:16:10+00:00
- Messages: 30
- Page 1 of 2: messages 1 to 25 (25 per page, add `?page=N` to the URL)
- Next page: https://externals.io/message/21912.md?page=2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #21912 — Steph Fox — 2006-02-18T17:16:10+00:00

URL: https://externals.io/message/21912#21912

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

---

## #21915 — Ilia Alshanetsky — 2006-02-18T19:07:05+00:00

URL: https://externals.io/message/21912#21915 · In reply to: #21912

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

Ilia

---

## #21916 — Andi Gutmans — 2006-02-18T19:30:11+00:00

URL: https://externals.io/message/21912#21916 · In reply to: #21912

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

---

## #21918 — Kevin Waterson — 2006-02-18T19:51:32+00:00

URL: https://externals.io/message/21912#21918 · In reply to: #21912

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."

---

## #21922 — Kevin Waterson — 2006-02-18T22:13:09+00:00

URL: https://externals.io/message/21912#21922 · In reply to: #21920

This one time, at band camp, "Steph Fox" <steph@zend.com> wrote:

> > […]
> 
> 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."

---

## #21920 — Steph Fox — 2006-02-18T22:27:47+00:00

URL: https://externals.io/message/21912#21920 · In reply to: #21918

> 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

---

## #21921 — Steph Fox — 2006-02-18T22:33:58+00:00

URL: https://externals.io/message/21912#21921 · In reply to: #21916

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:
> > […]
>
> -- 
> 
> 
>
>
> __________ NOD32 1.1380 (20060125) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com

---

## #21923 — Steph Fox — 2006-02-18T22:44:12+00:00

URL: https://externals.io/message/21912#21923 · In reply to: #21922

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


> This one time, at band camp, "Steph Fox" <steph@zend.com> wrote:
>
> > […]
>
> 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."
>
> -- 
> 
> 
>
>
> __________ NOD32 1.1380 (20060125) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com

---

## #21924 — Andi Gutmans — 2006-02-18T22:48:02+00:00

URL: https://externals.io/message/21912#21924 · In reply to: #21921

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
>
>
> > […]

---

## #21925 — Steph Fox — 2006-02-18T22:54:26+00:00

URL: https://externals.io/message/21912#21925 · In reply to: #21924

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:
> > […]
>
> -- 
> 
> 
>
>
> __________ NOD32 1.1380 (20060125) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com

---

## #21926 — Andi Gutmans — 2006-02-18T22:56:54+00:00

URL: https://externals.io/message/21912#21926 · In reply to: #21925

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
>
>
> > […]

---

## #21927 — Robert Cummings — 2006-02-18T23:01:03+00:00

URL: https://externals.io/message/21912#21927 · In reply to: #21921

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.          |
`------------------------------------------------------------'

---

## #21928 — Steph Fox — 2006-02-18T23:11:06+00:00

URL: https://externals.io/message/21912#21928 · In reply to: #21926

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


> 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:
> > […]
>
> -- 
> 
> 
>
>
> __________ NOD32 1.1380 (20060125) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com

---

## #21929 — Andi Gutmans — 2006-02-18T23:14:03+00:00

URL: https://externals.io/message/21912#21929 · In reply to: #21928

Argh, re-read my first email. I gave my reasoning there...

At 03:11 PM 2/18/2006, Steph Fox wrote:
>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
>
>
> > […]

---

## #21930 — Steph Fox — 2006-02-18T23:15:13+00:00

URL: https://externals.io/message/21912#21930 · In reply to: #21915

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


> I'll avoid re-iterating all of the comments I've said back in December and 
> simply summarize by saying -1.
>
> Ilia
>
> -- 
> 
> 
>
>
> __________ NOD32 1.1380 (20060125) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com

---

## #21931 — Steph Fox — 2006-02-18T23:16:43+00:00

URL: https://externals.io/message/21912#21931 · In reply to: #21927

> In a previous email Steph Fox writes:
> > […]
>
> Then in this email Steph Fox writes:
> > […]
>
> 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 :)

---

## #21932 — Steph Fox — 2006-02-18T23:20:53+00:00

URL: https://externals.io/message/21912#21932 · In reply to: #21929

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


> Argh, re-read my first email. I gave my reasoning there...
>
> At 03:11 PM 2/18/2006, Steph Fox wrote:
> > […]
>
> -- 
> 
> 
>
>
> __________ NOD32 1.1380 (20060125) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com

---

## #21933 — Derick Rethans — 2006-02-18T23:53:05+00:00

URL: https://externals.io/message/21912#21933 · In reply to: #21926

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



> 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:
> > […]
> 
> 

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #21934 — Andi Gutmans — 2006-02-19T00:13:22+00:00

URL: https://externals.io/message/21912#21934 · In reply to: #21933

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:
>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
>
>
>
> > […]
> (the devs) don't
> > […]
> use anyway :)
> > […]
> why I'm wholly
> > […]
> 'ease of use'
> > […]
> great deal of
> > […]
> bad idea - I
> > […]
> any problem
> > […]
> <internals@lists.php.net>
> > […]
> implemented it would
> > […]
> more elegant
> > […]
> substantial to PHP
> > […]
> discussion).
> > […]
> this case,
> > […]
> (i.e. the Perl
> > […]
> Dmitry did
> > […]
> discussed on
> > […]
> time, could you
> > […]
> it to bed for
> > […]
>
>--
>Derick Rethans
>http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #21944 — Wez Furlong — 2006-02-19T23:09:27+00:00

URL: https://externals.io/message/21912#21944 · In reply to: #21924

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.


> 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:
> > […]

---

## #21945 — Steph Fox — 2006-02-20T00:18:51+00:00

URL: https://externals.io/message/21912#21945 · In reply to: #21944

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.


> 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:
> > […]

---

## #21948 — Derick Rethans — 2006-02-20T07:22:49+00:00

URL: https://externals.io/message/21912#21948 · In reply to: #21934

> 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

---

## #21951 — Hartmut Holzgraefe — 2006-02-20T09:06:06+00:00

URL: https://externals.io/message/21912#21951 · In reply to: #21948

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

---

## #21952 — Hartmut Holzgraefe — 2006-02-20T09:06:40+00:00

URL: https://externals.io/message/21912#21952 · In reply to: #21944

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

---

## #21958 — Lukas Smith — 2006-02-20T11:43:23+00:00

URL: https://externals.io/message/21912#21958 · In reply to: #21952

Hartmut Holzgraefe wrote:
> Wez Furlong wrote:
> > […]
> 
> FULLACK

+1

regards,
Lukas

---

Next page: https://externals.io/message/21912.md?page=2
