RE: [PHP-DEV] Re: Labeled Breaks (not the G-word)
| From: | Dmitry Stogov | Date: | Mon, 28 Nov 2005 07:57:19 +0000 |
| Subject: | RE: [PHP-DEV] Re: Labeled Breaks (not the G-word) | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20694@lists.php.net to get a copy of this message | ||
You can do "retry" without "goto".
do {
try {
} catch (Exception $e) {
continue;
}
} while (0);
Both "goto" and "jump" names are good for me (not "break", not
"continue').
However I don't see a lot of reason in "goto" and especially in limited
version
(even jumping forward may make messed code too).
-1 for "goto" at all
-2 for limited "goto"
Thanks. Dmitry.
> -----Original Message-----
> From: Ilia Alshanetsky [mailto:ilia@prohost.org]
> Sent: Sunday, November 27, 2005 7:07 PM
> To: Zeev Suraski
> Cc: Marcus Boerger; Wez Furlong; Edin Kadribasic; Derick
> Rethans; Dmitry Stogov; Sara Golemon; PHP Developers Mailing
> List; Andi Gutmans; Stanislav Malyshev; Andrei Zmievski; Jani
> Taskinen; Rasmus Lerdorf
> Subject: Re: [PHP-DEV] Re: Labeled Breaks (not the G-word)
>
>
> Zeev Suraski wrote:
> > 1. A forward-jumping construct only, to avoid giving users
> too much
> > ammo to shoot themselves in the foot with spaghetti coding.
>
> One of the major uses of "jump" is the ability to "retry on
> error" by jumping backwards inside the code. Given that the
> limit of the functionality is completely superficial, there
> are no engine reasons for it, I'd much prefer we did not impose it.
>
> Ilia
>
>