Re: Re: GOTO and/or BREAK LABEL
| From: | Rasmus Lerdorf | Date: | Tue, 07 Mar 2006 17:56:50 +0000 |
| Subject: | Re: Re: GOTO and/or BREAK LABEL | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-22218@lists.php.net to get a copy of this message | ||
Dmitry Stogov wrote:
Rasmus, C hasn't "break label;", and I don't understand why Java way confising C people. It is clear and fit into structured programming.But the thing doesn't say: this-is-a-break-label label: It just says: label: Which would lead me to write something like: label_a: $i=0; label_b: $i++; while($i<10) {
if(foo()) continue label_b;
else {
if(bar($i++)) goto label_a;
}
}
That doesn't make any sense, of course, but I was led astray by a familiar-looking language construct not doing what I expected.
We have to remember our audience here.
And yes, for the record, my vote is for (2) or (4). The others smell like design by committee compromises to me.
-Rasmus