On Thu, Sep 07, 2017 at 12:47:51AM -0700, Chris Peterson wrote:
> On 2017-09-06 8:06 PM, Ehsan Akhgari wrote:
> > The interesting points to consider is the data that Nick alluded to in
> > the previous discussion about the existing prevalent style.
> > 
> > Also, the point you up about the pragmatic aspect of the need to be able
> > to use automated tools in order to manage our Coding Style is right on.
> > As things stand, the only viable option of such a tool that I'm aware of
> > is clang-format, and given the standing situation with regards to what
> > formatting options we can make that tool support in this case, I think
> > the pragmatic decision is to pick *one* option here for the placement of
> > operators across line breaks: either at the end of long lines or in the
> > beginning of the next line.
> > 
> > The combination of the above points makes me prefer adopting the
> > proposal to treat all operators like && and ||.
> 
> There are only a couple hundred instances of boolean operators after a line
> break in mozilla-central C++ code. I know this search is inexact, but it
> shows the (small) scale of this usage compared to the proposed
> before-line-break style.
> 
> https://searchfox.org/mozilla-central/search?q=%5E%5Cs%2B(%3E%7C%3E%3D%7C%3C%7C%3C%3D%7C%3D%3D%7C!%3D)%5Cs%2B(%5Cw%7C%5C()&case=true&regexp=true&path=.c

Note that there seems to be about the same number of boolean operators
before a line break (if you ignore the ones from generated code)

https://searchfox.org/mozilla-central/search?q=%5Cs(%3E%7C%3E%3D%7C%3C%7C%3C%3D%7C%3D%3D%7C!%3D)%5Cs*%24&case=true&regexp=true&path=.c

Mike
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to