note 91421 deleted from control-structures.goto by danbrown
| From: | danbrown@php.net | Date: | Tue, 09 Jun 2009 23:01:42 +0000 |
| Subject: | note 91421 deleted from control-structures.goto by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-156689@lists.php.net to get a copy of this message | ||
Note Submitter: Allen Grenander
----
The goto statement is indeed very powerful. Especially when used with the switch statement which is
explicitly not allowed in php.
The 2nd powerful use of the goto statement is in creating nearly unreadable code and completely
unmaintainable applications.
I'm not suggesting that this control structure needs to be removed from the language. But new
coders do need to be warned against the superfluous use of this construct.
In most cases, heavy use of the goto statement means that the problem being solved has not been
properly understood or analyzed.