Re: PHP 5.1
| From: | Rasmus Lerdorf | Date: | Mon, 06 Jun 2005 16:16:02 +0000 |
| Subject: | Re: PHP 5.1 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-16449@lists.php.net to get a copy of this message | ||
Personally I am quite ambivalent about adding goto. What I am not
ambivalent about is adding anything that will be a nightmare to support.
If the goto patch can be done in such a way that there is absolutely no
way that it will cause weird stack corruptions or other scope issues
when people use it incorrectly then I don't mind. People will use it
incorrectly just like they use all sorts of other features incorrectly,
but if it causes PHP to blow up or lose track of its scope, then I say
we leave it out. Some examples:
while(a) {
goto c;
while(b) {
c:
break 1;
}
}
Will that break out of the outer loop? Or slightly simpler:
c:
while(a) {
if(b) goto c;
break 1;
}
Am I 1 or 2 levels deep in that while loop once I enter it again after
the goto?
-Rasmus