Layout changes are frequently unmergable to branches other than by a
tedious process of diff and hand edit iteration. That introduces
lots of badness:

1. If they're not merged then they (and any fixes hidden in them) are
likely to randomly disappear in future.

2. If they're not merged cross-comparing a branch against trunk becomes
meaningless so other changes after the layout change can be easily, and
often invisibly, lost.

3. If they are merged someone's gone through a tedious process that is
orders of magnitude more likely to introduce errors than the original.

4. If they are merged cross-comparing against trunk _after_ the layout
change is possible but diffing the branch to verify what changes have
been made becomes meaningless.

Avoid unnecessary layout changes! Respect the original layout of code
unless you are changing a substantial amount. If you feel you MUST
change layout do _one_ thing per commit and document it _very_ clearly
in the commit comment (e.g. "substituted tabs with <n> spaces", "changed
'if (...) {' to 'if (...)\n  {'") so it's easily reproducible. Never,
ever, EVER, mix large scale layout changes with other changes!

If you're creating a new file you can, of course, do whatever you want.
But if that's anything other than the universal default of tab indenting
to 8 char tab stops you SHOULD document it and put in modelines for at
least vim and emacs (although bear in mind that some distributions ship
with global vimrcs that set modelines=0 so nothing but the default "just
works").

In an ideal world people would only ever use tabs OR spaces, never set
tab stops to other than the default 8 and would not expect people to keep
changing their editor configs - there's no way of knowing what else they
use or edit.

Sadly, even after a good few years of constructive discussion far too
many people still think layout and editor settings are a religious
argument to be won rather than a purely pragmatic issue :-(

Mike

-- 
Mike Jagdis                        Web: http://www.eris-associates.co.uk
Eris Associates Limited            Tel: +44 7780 608 368
Reading, England                   Fax: +44 118 926 6974
_______________________________________________
Callweaver-dev mailing list
[email protected]
http://lists.callweaver.org/mailman/listinfo/callweaver-dev

Reply via email to