On 09/04/2018 07:50 AM, David Teller wrote:
> I am all for making braces a requirement, both to unify with Gecko and
> for safety reasons – it would be really annoying to introduce bugs, as
> Apple did not that long ago, just because of missing braces.
I say this all with a bit of a smile (in case it is not obvious), but:
Bracing single-line statements is a trash rule.
"Safety" is a trash justification. The proper solution to the "safety" concern is to enforce an indentation rule that absolutely addresses the trash situation Apple had.
The hyper-fixation of brace-everything defenders on a single case gone wrong -- without ever considering that enforcing *other*, utterly un-controversial, existing style rules would equally have addressed that concern and every other "safety" concern bracing moots -- is a myopia of "safety" over readability and noise reduction.
And IMO readability on every single line of source code, even outweighs the false "safety" or bug-avoidance supposition of always-bracing.
Gecko absolutely should change their trash rule and not require single-line bracing by enforcing indentation requirements.
But the utterly uncontroversial fact that Gecko's style is trash is not great enough reason to not join them. Mozilla has long had a problem of our never being able to converge on single solutions for things (IRC, Slack; Mercurial, git, svn, I think even bzr or arch in one or two places; Bugzilla, Service Now, Github, other request tracking; and so on). It is better to encourage standardization at cost in denying Inescapable Fact, than to actually be right.