On 01/06/2014 03:10 PM, Karl Tomlinson wrote:
> Martin Thomson writes:
> 
>> I would like to think that adding (or removing) braces from block statements
>> should be acceptable.
> 
> I would argue that braces should not be added with automation.
> 
> When debugging code, it is important to understand the intent of
> the author.  Adding braces at parser-determined points disguises
> the intent.

I agree with karl. Automated insertion of braces could easily hide bugs.

e.g. consider this buggy code:
  if (condition)
    foo();
    bar();

If we allow a tool to automatically place braces around "foo()", then
that won't change behavior, but it will hide the fact that the author
*meant* for both foo() and bar() to be inside the block.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to