On 2014-01-06, at 12:36, Karl Tomlinson <mozn...@karlt.net> wrote: > I'm sceptical about the value of such changes out-weighing the > cost here. I know there will be a cost now and in the future, but > I don't recall seeing any entire files so badly formatted that it > took me more time to understand the code. If there are any styles > in use that really do make the code harder to read then I would > support modifications to improve readability of that particular code.
I think that the mail from Mike Hoye provides reasonable evidence that good formatting is valuable, and more so than I first thought. > However, if the differences are costing more than the costs of > changing, and this proposal goes ahead, can we try to limit the > cost of changing, please? > > It's already been mentioned that some blame tools can already > handle whitespace changes. Similarly some patch tools can handle > whitespace changes. These features could help with the cost of > merging outstanding and in-progress patches if the kind of style > changes are limited appropriately. This would require that > > 1. Mass style changes consist only of changing sequences of one or > more blanks to another sequence of one or more blanks. I would like to think that adding (or removing) braces from block statements should be acceptable. > 2. No code is moved to a different line. This actually follows > from 1, but is worth calling out separately because moving code > around would cause the biggest problems. I don’t think that this is a useful constraint. On the contrary, it hampers the formatting tools in ways that are detrimental to the overall end goal. If your intent is to be able to move toward a consistent style, that will require that the occasional character move between lines. The tool that I posted a link to earlier has ways to maintain blame across both of the above sorts of changes. > That might seem like a small subset of the differences in style, > but indentation differences are probably the biggest cost of moving > code from a file of one style to a file of another. I disagree. I think that the bigger costs come from changing naming conventions (_memberVariable to memberVariable_ to mMemberVariable), because that can’t be done a file at a time. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform