On Jun 7, 2005, at 8:25 AM, Stanislav Malyshev wrote:

GB>>control structures are not useful.  This is not the case in PHP. A
GB>>simple example in the manual showing proper usage of break/ continue GB>>and warning to only use goto as a last resort would be sufficient for
GB>>discouraging newbies from shooting their feet off.

The problem is not only that - the problem is that some constructs might
be unsafe to jump in. Example - jumping in or out of foreach may be
very problematic with current engine (jumping in may result in crash,
jumping out - in memory leaks). And there can be more such things.

Perl's goto specifically forbids jumping into control structures that require intialization (for instance, foreach()). That seems like a sensible limitation to me.

George

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

Reply via email to