Re: PHP 5.1
| From: | Petar Nedyalkov | Date: | Tue, 07 Jun 2005 06:40:35 +0000 |
| Subject: | Re: PHP 5.1 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-16509@lists.php.net to get a copy of this message | ||
On Monday 06 June 2005 14:37, Derick Rethans wrote:
> 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).
I think it's OK.
All objections agains 'goto' are not based on it's existence but on it's use.
So restricting the use to a static label in the current scope is fine. If you
don't like using it (as most of us have been taught in our CS lectures) -
simply don't use it.
+1 for me.
>
> Derick
>
> --
> Derick Rethans
> http://derickrethans.nl |
> http://ez.no | http://xdebug.org
--
Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)
PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]