Re: PHP 5.1
| From: | George Schlossnagle | Date: | Tue, 07 Jun 2005 12:32:51 +0000 |
| Subject: | Re: PHP 5.1 | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-16505@lists.php.net to get a copy of this message | ||
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