On Sun, Nov 22, 2015 at 01:45:43PM +0100, Martin Mares wrote: > > there won't ever be a right time. either you accept that legible code is > > worth it, or you don't. > > This smells of false dichotomy :) Legible code has its advantages and > reformatting large chunks of code has its cost. You just need to find the > right balance for a given project. > the context was pretty clear, which makes your objection baseless.
> For example, you can declare that re-indenting the code just for the sake > of legibility is taboo, but whenever somebody significantly changes a piece > of code, he has the right to clean it up (as a separate patch, preferably). > > This leads to more legible code in the long run, while avoiding most of the > cost. > so instead of a single cleanup, there is a bazillion of cleanups. that's positively not avoiding the cost, but spreading it. that comes with an interest rate. in qt, the rule is to fix the style of only exactly the lines that are being touched anyway. but this works only if the codebase is in a reasonable shape in the first place. in cases where this is not so, a prior bulk cleanup is in order - as big as reasonable, to avoid unnecessary churn.