On Mon, 2005-06-06 at 15:47, Jared Williams wrote:
> > 
> > JC>>Since when did anyone care that we were giving users 
> > enough rope to 
> > JC>>hang themselves with?
> > 
> > There's rope and rope. Giving rope is one thing, giving a 
> > pack of explosives is another.
> > 
> > JC>>I don't think we should worry ourselves with people who 
> > don't know 
> > JC>>how to code and abuse language constructs like goto -- especially 
> > JC>>when they
> > 
> > The problem that concerns me is that I suspect most of its 
> > uses would be abuse, actually. The only "legitimate" use for 
> > it I can see it exit from control block without counting 
> > brackets - which would be better solved by labeled 
> > break/continue, I think. Can you give me another legitimate use?
> 
> PHP Code generation tools?
> 
> There is a lot of useful code generation tools out there that would be useful 
> when developing in PHP, but quite a few use goto, so
> porting to PHP output becomes non-trivial.
> 
> > JC>>have a limited but practical purpose. +1 to a limited goto.

For those who know what they are doing, goto is probably the most
concise and clean construct for implementing parsing. It is also
generally much faster than using other constructs to emulate what would
normally be done using goto. If you have doubts, go view the C code for
the PHP parser.

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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to