Re: [PHP] The goto discussion on the Internals List

2005-06-11 Thread Richard Lynch
On Thu, June 9, 2005 6:49 am, Jochem Maas said: Richard Lynch wrote: And, for the record, *I* sure as hell don't want to see a GoTo in PHP. whats your take on ifsetor()?, personally I would like to see it. I think its a great way to teach newbies about checking vars before use (if nothing

Re: [PHP] The goto discussion on the Internals List

2005-06-09 Thread Jochem Maas
Richard Lynch wrote: On Tue, June 7, 2005 10:59 am, Robert Cummings said: PHP has never purported to be an OOP only language. It advocates both procedural and OOP programming methodologies. Just ask Richard Lynch :) Don't bother asking me - Ask Rasmus :-) And, for the record, *I* sure as

Re: [PHP] The goto discussion on the Internals List

2005-06-09 Thread Greg Donald
On 6/9/05, Jochem Maas [EMAIL PROTECTED] wrote: whats your take on ifsetor()?, personally I would like to see it. I think its a great way to teach newbies about checking vars before use (if nothing else) That and error_reporting( E_ALL ); -- Greg Donald Zend Certified Engineer

Re: [PHP] The goto discussion on the Internals List

2005-06-09 Thread Jason Wong
On Thursday 09 June 2005 23:08, Greg Donald wrote: On 6/9/05, Jochem Maas [EMAIL PROTECTED] wrote: whats your take on ifsetor()?, personally I would like to see it. I think its a great way to teach newbies about checking vars before use (if nothing else) That and error_reporting( E_ALL );

RE: [PHP] The goto discussion on the Internals List

2005-06-08 Thread Richard Lynch
On Tue, June 7, 2005 10:59 am, Robert Cummings said: PHP has never purported to be an OOP only language. It advocates both procedural and OOP programming methodologies. Just ask Richard Lynch :) Don't bother asking me - Ask Rasmus :-) And, for the record, *I* sure as hell don't want to see a

Re: [PHP] The goto discussion on the Internals List

2005-06-07 Thread Jason Barnett
I agree 100% with Greg's comments for the goto() / ifsetor() discussion on the internals list. As far as speed goes if the dev team knew of ways to improve specific parts of the codebase (while maintaining the rest of the features available in PHP) then I'm confident they would make that

Re: [PHP] The goto discussion on the Internals List

2005-06-07 Thread Jochem Maas
Jason Barnett wrote: I agree 100% with Greg's comments for the goto() / ifsetor() discussion on the internals list. As far as speed goes if the dev team knew of ways to improve specific parts of the codebase (while maintaining the rest of the features available in PHP) then I'm confident they

Re: [PHP] The goto discussion on the Internals List

2005-06-07 Thread Rory Browne
If there is a use for goto, that can cause certain tasks to be acomplished faster using goto, and that implementing goto in the ZE isn't too much work, then I don't see a problem with implementing it. I'm not totally sure why, but Zend used goto, in the Zend Engine(one used for php4) code for

RE: [PHP] The goto discussion on the Internals List

2005-06-07 Thread Jay Blanchard
[snip] Goto has (I believe) been described as a method of shooting yourself in both feet at the same time. [/snip] goto (not a 'new' construct as was mentioned earlier) had its uses, but thos would seem depricated now as you can call a function, which is essentially what a goto did. Consider;

RE: [PHP] The goto discussion on the Internals List

2005-06-07 Thread Robert Cummings
On Tue, 2005-06-07 at 10:50, Jay Blanchard wrote: [snip] Goto has (I believe) been described as a method of shooting yourself in both feet at the same time. [/snip] goto (not a 'new' construct as was mentioned earlier) had its uses, but thos would seem depricated now as you can call a

RE: [PHP] The goto discussion on the Internals List

2005-06-07 Thread Jay Blanchard
[snip] Absolutely nobody in this day and age advocated goto lineNumber. The only use to have useful advantage is goto labelName and of course that is where the labelName exists within the current execution scope. A function call is not an acceptable replacement since you incure the overhead of

Re: [PHP] The goto discussion on the Internals List

2005-06-07 Thread John Nichel
Jay Blanchard wrote: snip The speed difference is negligible though, in this day and age, dependent upon how much hair-splitting you would care to do. You're still setting aside a block of code which will have to be parsed and you incur the same setup if the goto section is the same code as the

Re: [PHP] The goto discussion on the Internals List

2005-06-07 Thread Robert Cummings
On Tue, 2005-06-07 at 14:26, John Nichel wrote: Jay Blanchard wrote: snip The speed difference is negligible though, in this day and age, dependent upon how much hair-splitting you would care to do. You're still setting aside a block of code which will have to be parsed and you incur the

RE: [PHP] The goto discussion on the Internals List

2005-06-07 Thread Jay Blanchard
[snip] A more realistic speed hit is the fact that using if/elseif/else or switch statements requires on average an O( n ) lookup, whereas a proper goto implemention is O( 1 ). Now I'll give you you could do an label to function map and use that instead, but that's still O( lg n ). [/snip] Ah the

Re: [PHP] The goto discussion on the Internals List

2005-06-06 Thread Greg Donald
On 6/6/05, Chris Drozdowski [EMAIL PROTECTED] wrote: I perused the discussion about the inclusion of goto into the PHP language on the php.internals list. Yeah, I've been following it as well.. seems there would be bigger fish to fry, I dunno. I benched Ruby and PHP doing some simple random