[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Request For Comments: 3-space indentation style
- From: Craig Barnes <craigbarnes85@...>
- Date: Mon, 6 Jan 2014 11:03:33 +0000
On 5 January 2014 20:45, William Ahern <william@25thandclement.com> wrote:
> Indentation and alignment are two separate issues. We can _all_ agree that
> blocks should be indented, just not what the width should be. Use tabs and
> _every_ can be made happy by setting their tab stop.
>
> If you prefer a particular alignment when wrapping statements, expressions,
> and comments, then align them--using spaces. It's far easier for people to
> deal with quirky alignments then it is to deal with quirky and annoying
> indentation. And because alignments can be very complex--with invariably
> corner cases that require you to violate your own rules--editors do a
> horrible job of reflowing alignments of complex statements, so better to
> just disable that feature (please!).
>
> If you use tabs for indentation and spaces for alignment, then when people
> change their tab stop your alignment will still magically work.
>
Except that as soon as your code has tabs in it, all bets are off for aligning
anything. A tab is a variable-width character and is incompatible with
the notion of monospace alignment. It might seem to work so long as you
always view it in the same editor with the same tab width, but it'll surely
break as soon as someone views it with a different tab width.