Re: Make try/catch brackets optinal
| From: | Rafael Dohms | Date: | Thu, 19 Jul 2012 10:06:34 +0000 |
| Subject: | Re: Make try/catch brackets optinal | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61472@lists.php.net to get a copy of this message | ||
On Thu, Jul 19, 2012 at 12:03 PM, Charlie Somerville <
charlie@charliesomerville.com> wrote:
> This has code readability problem written all over it. When maintaining it
> also has problems, like with the bracket-less if's.
> You would need to add brackets if you add an extra line here, as well as
> you might get unexpected behaviour of you forget to
> add brackets in that case.
>
> I've often heard people make this argument, but I've never found it to be
> a real concern in practise.
>
> Is this really such a common problem?
>
I have seen this problem happen, people losing time trying to figure out
what is wrong only to find
its a missing bracket.
As Paul said, this is bug-prone.
--
Rafael Dohms
PHP Evangelist and Community Leader
http://www.rafaeldohms.com.br
http://www.phpsp.org.br