Re: Re: Labeled Breaks (not the G-word)
| From: | Stanislav Malyshev | Date: | Tue, 29 Nov 2005 08:42:47 +0000 |
| Subject: | Re: Re: Labeled Breaks (not the G-word) | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20804@lists.php.net to get a copy of this message | ||
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 stop the program entirely. Unlike exceptions, goto allows to
jump to a random point of code. I don't know what do you mean by "limited"
- I see that the consensus among the goto proponents is to not impose any
limits on the place you could jump to - because, of course, once you
strated to jump around you always can find a use for jumping to any place,
if you are creative enough - and I do not doubt creativity of PHP people.
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115