On Tue, 02 Sep 2014 17:00:01 +0200, Mark Rotteveel <m...@lawinegevaar.nl>
wrote:
> On Tue, 02 Sep 2014 11:43:54 -0300, Adriano dos Santos Fernandes
> <adrian...@gmail.com> wrote:
>> On 02/09/2014 11:35, Dimitry Sibiryakov wrote:
>>>    Hi, All.
>>>
>>>    When was decided that one-line blocks must not be enclosed with
>>>    parentheses? It is a
>>> rather dangerous style...
>>>
>> It's not, it was not and it will never be a dangerous style.
>> 
>> Everything is dangerous if you write code without attention.
> 
> Yes, but it makes a hell of a lot easier to get wrong. Remember the goto
> fail bug:
> 
> https://www.imperialviolet.org/2014/02/22/applebug.html
> 
> Braces around single statements would have made this bug less likely.

But, that said I am on the fence on this one. I prefer using braces in
most cases, but I have also seen cases were readability was better without,
usually with the if and the statement on a single line. In other words:
YMMV.

Mark

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to