RE: [PHP-DEV] PHP 5.1
| From: | Derick Rethans | Date: | Mon, 06 Jun 2005 11:37:16 +0000 |
| Subject: | RE: [PHP-DEV] PHP 5.1 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-16415@lists.php.net to get a copy of this message | ||
On Mon, 6 Jun 2005, Stanislav Malyshev wrote:
> MR>>expose the ugliness of what would _appear_ to be a handy feature. I
> MR>>don't pack any weight on this list so if someone with a -1 on this
> MR>>feature would like to kick it up to -2 I'd appreciate it.
>
> I'm not sure why goto should be needed after many years of successful life
> without it. I think parametrized break/continue takes care of all cases
> when I would need goto in C, so I think goto is not needed. In any case,
> goto in/out of the control block in an invitation to hell, since it would
> mess up a lot of assumptions and can lead to crashes/leaks. So I
> personally don't particularly like this idea.
We're only talking about a goto that:
- can only jump to a static label
- can only jump inside the current scope
With a parameterized break/continue you still can't just to the "end" of
your function to do clean ups (unless you wrap it in a control block
which is ugly and already possible anyway).
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org