On 2015-06-17 1:07 PM, Gregory Szorc wrote:
On Wed, Jun 17, 2015 at 8:14 AM, Ehsan Akhgari <ehsan.akhg...@gmail.com
<mailto:ehsan.akhg...@gmail.com>> wrote:

    On 2015-06-17 11:04 AM, Mike Hoye wrote:

        On 2015-06-17 6:53 AM, Mike Hommey wrote:

            So how about removing modelines and adding editorconfig files?


        I understand we're considering (or getting close to?) autoformatting
        code on check-in.


    Are we?  I'm curious to know more details about that...


Research shows that consistent code formatting increases readability,
which aids code comprehension and leads to fewer bugs. Furthermore,
having consistent style means machines can do the work of formatting and
auditing style, which means reviewers can focus more on what the code
does, not its cosmetics. The actual style isn't as important as the
style being consistent.

This is why organizations like Google and Facebook have established a
strong culture around consistent code formatting and have enabled
machines to do a lot of this work for them. See the Go programming
language and its gofmt tool, which goes a long way towards eliminating
formatting pains.

Yes, I'm very well aware of the benefits. :-) I have been asking for this forever.

I would strongly prefer for all Mozilla-authored code in mozilla-central
to follow a single code convention per language. Furthermore, this style
should be enforced through tools and formatting should largely be taken
out of the hands of humans and delegated to machines.

That is my preference as well. But my question was more about concrete stuff that people are doing towards this goal.

Yes, this means there will be epic bikesheds around establishing and
changing the style. But readability via consistency trumps that pain.

Can we all agree that the needs of the many outweigh the needs of the
few and establish a consistent and enforced C++ coding style across all
of mozilla-central?

I am pretty sure that we agreed on this some time last year.

> If so, perhaps we can find time in Whistler next
week to better integrate clang-format into the development workflow. I'd
be more than happy to help.

I would be interested to talk about this too!
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to