Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-12-12 Thread Derick Rethans
On Mon, 28 Nov 2005, Zeev Suraski wrote: > I'm indifferent to adding the restricted goto, and against adding a > full-featured goto. We can do well without either of them. We discussed this in the meeting, and we wanted a limited goto in the form of a break . Now the only addition here is the a

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-30 Thread Hartmut Holzgraefe
Ron Korving wrote: Well that's because labeled breaks should (in "our" opinion) be implemented paralel to goto. It is simply not the same. Of course you could break out of loops with a goto statement, but I'd much prefer true labeled breaks, where the label is set for the loop-construct itself,

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-30 Thread Ron Korving
Well that's because labeled breaks should (in "our" opinion) be implemented paralel to goto. It is simply not the same. Of course you could break out of loops with a goto statement, but I'd much prefer true labeled breaks, where the label is set for the loop-construct itself, not after the const

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-30 Thread Hartmut Holzgraefe
Joao Cruz Morais wrote: I'm sorry if I'm saying something that was already proposed, but why not use the Java approach to labeled breaks or something like this (dumb) example: while(true) as outer_cycle { $i = 0; while(true) if($i++ == 10) break outer_cycle; } well, this is only handli

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Joao Cruz Morais
I'm sorry if I'm saying something that was already proposed, but why not use the Java approach to labeled breaks or something like this (dumb) example: while(true) as outer_cycle { $i = 0; while(true) if($i++ == 10) break outer_cycle; } Regards, João C Morais On 11/29/05, Sara Golemon <

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Sara Golemon
My objection to goto is based on the fact that it allows to randomly transfer control between arbitary points of script, which can (and will) easily lead to spaghetti code and actually promotes this style of writing code. Yes, I agree... Exceptions cause exactly that kind of confus...oh..wait...

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Stanislav Malyshev
SG>>random than a catch statement. It's a deliberate, directed statement, and SG>>one which *does* clean up after itself despite your unfounded claims to the SG>>contrary. My objection to goto is based on the fact that it allows to randomly transfer control between arbitary points of script, whi

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Sara Golemon
It is clear from technical point. It is not clear from structural view, since it can be any random place in code, not connected to the previos place in any logical way. Are you deliberately trying to be antagonistic? A goto label is no more random than a catch statement. It's a deliberate, dir

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Jochem Maas
hi Stanislav, Stanislav Malyshev wrote: LS>>How is that different from "goto"? I start to suspect you just skip what I am writing. Didn't I explain that exception does not allow to jump to random points and goto does? LS>>And if you can jump through 80% if your code via an exception while y

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Jochem Maas
Stanislav Malyshev wrote: EK>>This might be from implementation/engine point of view, but from user's EK>>perspective goto is much more limited. It can only happen within one EK>>function. That's good. PHP is a limited language - you can not do many things in PHP that you can do in C, for examp

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Ilia Alshanetsky
Stanislav Malyshev wrote: > Exceptions are structured way of handling code flow - you can not get to > random points of code with exception, you can get either to enclosing > catch or stop the program entirely. Unlike exceptions, goto allows to > jump to a random point of code. I don't know what

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Hartmut Holzgraefe
Stanislav Malyshev wrote: HH>>a small objection here: with a GOTO it is clear where execution continues, HH>>you can simply search for the label the GOTO is using. With exceptions on It is clear from technical point. It is not clear from structural view, since it can be any random place in code

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Stanislav Malyshev
HH>>a small objection here: with a GOTO it is clear where execution continues, HH>>you can simply search for the label the GOTO is using. With exceptions on It is clear from technical point. It is not clear from structural view, since it can be any random place in code, not connected to the previ

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Lukas Smith
Stanislav Malyshev wrote: LS>>How is that different from "goto"? I start to suspect you just skip what I am writing. Didn't I explain that exception does not allow to jump to random points and goto does? You are argue on technical/internals terms. I agrue that what is "defined" and "clear"

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Bart de Boer
It may be so that you can use exceptions as a sort of goto mechanism. And from some perspective you may even find some similarities. However, exceptions weren't invented for this purpose. (And they aren't introduced into PHP for this reason.) The main difference is that exceptions work with

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Hartmut Holzgraefe
Stanislav Malyshev wrote: Precentage of code that lies between throw point and catch point has nothing to do with anything. The structure of the code - that you always know which block encloses the code with exception potential and which code would handle the exception if it arises - has everyt

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Ron Korving
Exactly, I don't see why people are mixing up the two in this discussion. I think everybody can agree that a labeled break would really add something to PHP. goto is a totally different story that should be discussed parallel to labeled break. It is _not_ the same thing and the two can co-exist

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Edin Kadribasic
Stanislav Malyshev wrote: > LS>>discussions over the past months it seemed to me that the "goto all the > way" > LS>>camp was fine with limiting jumping to the current scope (function/method) > > That doesn't do much. That's like saying "access not to all memory but > only memory space of the pr

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Hartmut Holzgraefe
Stanislav Malyshev wrote: Exceptions are structured way of handling code flow - you can not get to random points of code with exception, you can get either to enclosing catch or stop the program entirely. Unlike exceptions, goto allows to jump to a random point of code. a small objection her

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Stanislav Malyshev
LS>>How is that different from "goto"? I start to suspect you just skip what I am writing. Didn't I explain that exception does not allow to jump to random points and goto does? LS>>And if you can jump through 80% if your code via an exception while you LS>>unwind the stack it might be ordered

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Stanislav Malyshev
EK>>This might be from implementation/engine point of view, but from user's EK>>perspective goto is much more limited. It can only happen within one EK>>function. That's good. PHP is a limited language - you can not do many things in PHP that you can do in C, for example. Many of these things usu

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Lukas Smith
Stanislav Malyshev wrote: No, they are not. If you don't purposedly abuse it, exceptions are a structured way to handle exceptional situations, with well-defined effects and known control points. They won't allow you to randomly jump around the code. How is that different from "goto"? And i

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Stanislav Malyshev
LS>>discussions over the past months it seemed to me that the "goto all the way" LS>>camp was fine with limiting jumping to the current scope (function/method) That doesn't do much. That's like saying "access not to all memory but only memory space of the process". Sure, you can't just jump rando

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Lukas Smith
Stanislav Malyshev wrote: LS>>a scope limited goto will never be close as dangerous for spagetti LS>>code as exceptions already are because they are not scope limited. Exceptions are structured way of handling code flow - you can not get to random points of code with exception, you can get eit

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Bart de Boer
I agree. Although there's aanother thread running about namespaces that are about to do something with ':' as well. Watch out that there aren't conflicts? Ron Korving wrote: I agree. Like you I couldn't really care about a 'goto', I'd probably never use it. But labeled breaks would really ad

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Ron Korving
I agree. Like you I couldn't really care about a 'goto', I'd probably never use it. But labeled breaks would really add something to the language. The current break counters aren't very user friendly if you ask me. I'm very much in favor of: LABEL: while (cond) { ... break LABEL; ... } I

RE: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Ford, Mike
On 29 November 2005 09:18, Bart de Boer wrote: > I feel we're comparing apples with oranges here. > > Break; is for breaking out of loops. It shouldn't have anything to do > with jumping to somewhere else. Let's say *if* PHP supported jumping > through the code. The following should then be two d

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Bart de Boer
I feel we're comparing apples with oranges here. Break; is for breaking out of loops. It shouldn't have anything to do with jumping to somewhere else. Let's say *if* PHP supported jumping through the code. The following should then be two different things: while (loop) { goto LABEL; } :LAB

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-29 Thread Stanislav Malyshev
LS>>a scope limited goto will never be close as dangerous for spagetti LS>>code as exceptions already are because they are not scope limited. Exceptions are structured way of handling code flow - you can not get to random points of code with exception, you can get either to enclosing catch or s

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-28 Thread Lukas Smith
Stanislav Malyshev wrote: MB>>cool argument: as long as there are worse features we can add anything? :-)) No, as long as the feature has high abuse potential (hint: goto does) it is better not to add it. Of course, it's not always possible, some features are vital even if dangerous. But got

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-28 Thread John Coggeshall
goto++ On Sun, 2005-11-27 at 19:27 -0500, George Schlossnagle wrote: > me 3. > > goto is good. > > Wez Furlong wrote: > > >me also > > > > > >On 11/27/05, Edin Kadribasic <[EMAIL PROTECTED]> wrote: > > > > > >>Ilia Alshanetsky wrote: > >> > >> > >> > >>>If it comes down to count of +1/-

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-28 Thread Marcus Boerger
Hello Stanislav, Monday, November 28, 2005, 8:37:37 PM, you wrote: MB>>>cool argument: as long as there are worse features we can add anything? :-)) > No, as long as the feature has high abuse potential (hint: goto does) it > is better not to add it. Of course, it's not always possible, some

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-28 Thread Stanislav Malyshev
MB>>We are on the other end we don't have to decide if we can get the devil out MB>>of php but simply decide not to let the devil in. If you really need goto I agree with that. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP In

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-28 Thread Marcus Boerger
Hello Stanislav, and don't forget that in languages like C you cannot take out the goto because you would need to develop tons of compiler tools from scratch. We are on the other end we don't have to decide if we can get the devil out of php but simply decide not to let the devil in. If you real

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-28 Thread Stanislav Malyshev
MB>>cool argument: as long as there are worse features we can add anything? :-)) No, as long as the feature has high abuse potential (hint: goto does) it is better not to add it. Of course, it's not always possible, some features are vital even if dangerous. But goto is nowhere near vital, IM

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-28 Thread Marcus Boerger
Hello Stanislav, cool argument: as long as there are worse features we can add anything? :-)) best regards marcus Monday, November 28, 2005, 10:38:35 AM, you wrote: > IPC>>It seems illogical to put a limit on jumping backwards just because > IPC>>someone mihgt make messy code. People are per

Re: [PHP-DEV] Something (was: Re: [PHP-DEV] Re: Labeled Breaks (not the G-word))

2005-11-28 Thread Jason Garber
Hello Zeev, I would like to point out that PHP has been changing over the last few years from a language that Rasmus used for his online resume to an enterprise grade application development language. I've personally watched it go from PHP3 -> PHP4 -> PHP5, and *much* anticipate the fut

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-28 Thread Lester Caine
Zeev Suraski wrote: I'm indifferent to adding the restricted goto, and against adding a full-featured goto. We can do well without either of them. As I keep being told - "If you don't like something you don't have to use it" ;) But while a controlled goto could be a useful tool for some are

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-28 Thread Stanislav Malyshev
IPC>>It seems illogical to put a limit on jumping backwards just because IPC>>someone mihgt make messy code. People are perfectly capable of IPC>>making messy code regardless of what steps you might make to try to IPC>>prevent it. This is not correct. Example: if we had pointers (meaning, real

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-28 Thread Stanislav Malyshev
NBN>>gives the opportunity to screw their code to programmers, are you also NBN>>affirming that C programmers are smarter than PHP programmers ? Goto has had Code of C programmers oftenly harder to understand, especially when features like goto are used, especially if the programmer does not tak

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-28 Thread Zeev Suraski
I'm indifferent to adding the restricted goto, and against adding a full-featured goto. We can do well without either of them. Zeev At 02:27 28/11/2005, George Schlossnagle wrote: me 3. goto is good. Wez Furlong wrote: me also On 11/27/05, Edin Kadribasic <[EMAIL PROTECTED]> wrote: I

RE: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Dmitry Stogov
7:07 PM > To: Zeev Suraski > Cc: Marcus Boerger; Wez Furlong; Edin Kadribasic; Derick > Rethans; Dmitry Stogov; Sara Golemon; PHP Developers Mailing > List; Andi Gutmans; Stanislav Malyshev; Andrei Zmievski; Jani > Taskinen; Rasmus Lerdorf > Subject: Re: [PHP-DEV] Re: Labeled

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread George Schlossnagle
me 3. goto is good. Wez Furlong wrote: me also On 11/27/05, Edin Kadribasic <[EMAIL PROTECTED]> wrote: Ilia Alshanetsky wrote: If it comes down to count of +1/-1 about this feature, I am +1 for unrestricted forward/backward jumps and -1 for restricted version. I agree wi

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Wez Furlong
me also. On 11/27/05, Edin Kadribasic <[EMAIL PROTECTED]> wrote: > Ilia Alshanetsky wrote: > > > If it comes down to count of +1/-1 about this feature, I am +1 for > > unrestricted forward/backward jumps and -1 for restricted version. > > I agree with this. > > Edin > -- PHP Internals - PHP Runti

[PHP-DEV] Re: Something (was: Re: [PHP-DEV] Re: Labeled Breaks (not the G-word))

2005-11-27 Thread Nicolas Bérard Nault
I totally agree with you Zeev, your concerns are justified and I appreciate very much your concerns; they confirm PHP is not going to become yet another language with tons of useless features. Nevertheless, my opinion is that goto is not a complex language feature. It occurred to me quite a few tim

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Ian P. Christian
On Sunday 27 November 2005 21:55, Edin Kadribasic wrote: > I agree with this. +1 from me too for waht it's worth. It seems illogical to put a limit on jumping backwards just because someone mihgt make messy code. People are perfectly capable of making messy code regardless of what steps you mi

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Pierre
On Sun, 27 Nov 2005 22:55:08 +0100 [EMAIL PROTECTED] (Edin Kadribasic) wrote: > Ilia Alshanetsky wrote: > > > If it comes down to count of +1/-1 about this feature, I am +1 for > > unrestricted forward/backward jumps and -1 for restricted version. > > I agree with this. Same here --Pierre --

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Edin Kadribasic
Ilia Alshanetsky wrote: If it comes down to count of +1/-1 about this feature, I am +1 for unrestricted forward/backward jumps and -1 for restricted version. I agree with this. Edin -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Something (was: Re: [PHP-DEV] Re: Labeled Breaks (not the G-word))

2005-11-27 Thread Robert Cummings
On Sun, 2005-11-27 at 15:54, Zeev Suraski wrote: > > We *can* screw it if we go in the wrong > direction, and adding redundant features which > are useful in rare cases and much more likely to > be abused than to be properly used is a good step > in that direction. A lot of people are saying w

[PHP-DEV] Something (was: Re: [PHP-DEV] Re: Labeled Breaks (not the G-word))

2005-11-27 Thread Zeev Suraski
At 22:18 27/11/2005, Nicolas Bérard Nault wrote: Goto exists in C. If you affirm that goto should not exist in PHP because it gives the opportunity to screw their code to programmers, are you also affirming that C programmers are smarter than PHP programmers ? I wouldn't make any statement re

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Nicolas Bérard Nault
Goto exists in C. If you affirm that goto should not exist in PHP because it gives the opportunity to screw their code to programmers, are you also affirming that C programmers are smarter than PHP programmers ? Goto has had a bad reputation for far too much time. +1 for goto. On 11/27/05, Zeev S

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Hartmut Holzgraefe
Ilia Alshanetsky wrote: If it comes down to count of +1/-1 about this feature, I am +1 for unrestricted forward/backward jumps and -1 for restricted version. same here -- Hartmut Holzgraefe, Senior Support Engineer. MySQL AB, www.mysql.com -- PHP Internals - PHP Ru

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Ilia Alshanetsky
Zeev Suraski wrote: > Given that, I don't see the fact that this limitation is artificially > imposed, implementation-wise, to have any significance at all, either > way. The discussion should be on whether we should allow this > functionality or not. All I am trying to say is that there are not

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Zeev Suraski
At 20:03 27/11/2005, Robert Cummings wrote: On Sun, 2005-11-27 at 07:54, Zeev Suraski wrote: > Guys, > > Laughter has nothing to do with it. > > However, as discussed between those who attended the meeting in > Paris, goto earned its bad connotations for a reason. Goto got it's bad name from whe

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Marcus Boerger
Hello Ilia, as far as i know "do while" works pretty well. Just to be sure try this: php -r 'do { echo "Hello\n"; } while (0); echo "World\n";' Sunday, November 27, 2005, 5:06:39 PM, you wrote: > Zeev Suraski wrote: >> 1. A forward-jumping construct only, to avoid giving users too much >> am

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Robert Cummings
On Sun, 2005-11-27 at 07:54, Zeev Suraski wrote: > Guys, > > Laughter has nothing to do with it. > > However, as discussed between those who attended the meeting in > Paris, goto earned its bad connotations for a reason. Goto got it's bad name from when it was used to jump to line numbers. I ca

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Wez Furlong
Agreed; I use this style of coding a lot. I'd prefer "goto" but can deal with it being called "jump". --Wez. On 11/27/05, Ilia Alshanetsky <[EMAIL PROTECTED]> wrote: > Zeev Suraski wrote: > > 1. A forward-jumping construct only, to avoid giving users too much > > ammo to shoot themselves in the

RE: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Jared Williams
> Guys, > > Laughter has nothing to do with it. > > However, as discussed between those who attended the meeting > in Paris, goto earned its bad connotations for a reason. It > was agreed that providing a general-purpose C-goto equivalent > is not a good idea because it *will* very quickly le

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Zeev Suraski
At 18:06 27/11/2005, Ilia Alshanetsky wrote: Zeev Suraski wrote: > 1. A forward-jumping construct only, to avoid giving users too much > ammo to shoot themselves in the foot with spaghetti coding. One of the major uses of "jump" is the ability to "retry on error" by jumping backwards inside the

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Ilia Alshanetsky
Zeev Suraski wrote: > 1. A forward-jumping construct only, to avoid giving users too much > ammo to shoot themselves in the foot with spaghetti coding. One of the major uses of "jump" is the ability to "retry on error" by jumping backwards inside the code. Given that the limit of the functionalit

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Sander Steffann
Hi, On Sun, 27 Nov 2005, Zeev Suraski wrote: I'm not sold on reusing the break construct for that, since we're not really breaking, and I kind of like Ilia's "jump" idea. Another possibility would be reusing 'continue', which makes a bit more English sense, even though it's not very similar

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Jani Taskinen
On Sun, 27 Nov 2005, Zeev Suraski wrote: I'm not sold on reusing the break construct for that, since we're not really breaking, and I kind of like Ilia's "jump" idea. Another possibility would be reusing 'continue', which makes a bit more English sense, even though it's not very similar to co

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Zeev Suraski
Guys, Laughter has nothing to do with it. However, as discussed between those who attended the meeting in Paris, goto earned its bad connotations for a reason. It was agreed that providing a general-purpose C-goto equivalent is not a good idea because it *will* very quickly lead to spaghetti

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Marcus Boerger
Hello Wez, i already see the whole world laughing at us :-) marcus Thursday, November 24, 2005, 5:43:48 PM, you wrote: > Agreed; I see no reason to call it break (that makes it even more > confusing), and limiting jumps to one direction only is dumb; there is > no technical reason to do that.

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Rasmus Lerdorf
Christian Schneider wrote: Sara Golemon wrote: TBH, I was surprised to see this on the table in the first place myself... To me the summary of events looks like: 1) People disagree whether goto is A Good Thing 2) PDM discusses it and settles for a compromise solution No, we settled on an ini

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Gareth Ardron
Wez Furlong wrote: Agreed; I see no reason to call it break (that makes it even more confusing), and limiting jumps to one direction only is dumb; there is no technical reason to do that. Perl has a "goto" keyword, but it's pronounced "magic goto". We can have a "goto" keyword and pronounce it

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Ilia Alshanetsky
Christian Schneider wrote: > 3) internals removes the restrictions of the compromise Only one restriction is being removed, it being the ability to jump back in the code. > ?) It is added even though no clear majority wanted a full-blown goto Last time goto was discussed it was a very close dec

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Christian Schneider
Sara Golemon wrote: TBH, I was surprised to see this on the table in the first place myself... To me the summary of events looks like: 1) People disagree whether goto is A Good Thing 2) PDM discusses it and settles for a compromise solution 3) internals removes the restrictions of the compromis

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Sascha Schumann
So, I'm +1 on the patch with sane names and removed restrictions; Agreed. - Sascha -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Ilia Alshanetsky
Wez Furlong wrote: > Perl has a "goto" keyword, but it's pronounced "magic goto". We can > have a "goto" keyword and pronounce it "limited goto". If goto has bad connotations for many people and break seems confusing, how about calling it "jmp" or "jump" which precisely what the code does. Ilia

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Sara Golemon
1) The new syntax makes mess for me. 2) After (1) I don't see any reason in limitation to jump only down, Both of these items were based on the PDM meeting notes which required this specific behavior. 2) Your patch doesn't care about freeing loop variables and we got a memory leaks in the fol

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Wez Furlong
Agreed; I see no reason to call it break (that makes it even more confusing), and limiting jumps to one direction only is dumb; there is no technical reason to do that. Perl has a "goto" keyword, but it's pronounced "magic goto". We can have a "goto" keyword and pronounce it "limited goto". Bad

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Edin Kadribasic
e (1) { > break L; /* the same as "break 2" */ > } > } > > Thanks. Dmitry. > > >>-Original Message- >>From: Derick Rethans [mailto:[EMAIL PROTECTED] >>Sent: Thursday, November 24, 2005 1:04 PM >>To: Dmitry Stogov >>Cc:

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Edin Kadribasic
Ilia Alshanetsky wrote: > Derick Rethans wrote: > > >>- we wanted to prevent spagetti code which you can do by jumping up: >> >> "Similarly restricting the construct so that you can only jump >> down should satisfy people who do not want the ability to jump all over >> the place.

Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Ilia Alshanetsky
Derick Rethans wrote: > - we wanted to prevent spagetti code which you can do by jumping up: > > "Similarly restricting the construct so that you can only jump > down should satisfy people who do not want the ability to jump all over > the place." IMO making this limitation p

RE: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Dmitry Stogov
t; From: Derick Rethans [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 24, 2005 1:04 PM > To: Dmitry Stogov > Cc: 'Sara Golemon'; PHP Developers Mailing List; Andi > Gutmans; Zeev Suraski; Stanislav Malyshev; Marcus Boerger; > Wez Furlong; Andrei Zmievski; Jani Taski

RE: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Dmitry Stogov
> Cc: Andi Gutmans; Zeev Suraski; Stanislav Malyshev; Marcus > Boerger; Wez Furlong; Derick Rethans; Andrei Zmievski; Jani > Taskinen; Rasmus Lerdorf > Subject: RE: [PHP-DEV] Re: Labeled Breaks (not the G-word) > > > Hi Sara, > > I didn't like "goto" in

RE: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Derick Rethans
On Thu, 24 Nov 2005, Dmitry Stogov wrote: > 1) The new syntax makes mess for me. > "break" is a statement that exits from loop or switch, now we make a "goto" > statement but name it "break". > I belive that if we really implement goto (even with some limitations) we > shuld name it "goto", but no

RE: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-24 Thread Dmitry Stogov
Hi Sara, I didn't like "goto" in PHP, but after looking in this patch I see that limited "goto" can work. 1) The new syntax makes mess for me. "break" is a statement that exits from loop or switch, now we make a "goto" statement but name it "break". I belive that if we really implement goto (even