AW: Editor Tab Expansion
Mon, 9 Dec 2002 19:24:51 -0600
[Glynn Clements <firstname.lastname@example.org>]
> matt hellige wrote:
> > there seems to be an awfully strong bias against using hard tabs with
> > a configurable displayed width. i'd like to describe a situation where
> > i believe that option makes a lot of sense... suppose you're working
> > on a team of programmers on a project, and you need to come up with
> > some coding standards, since you all agree that's a wise thing to do.
> > no suppose 40% of the programmers like a 4-space indent, 40% like a
> > 2-space indent, and the other 20% like an 8-space indent. what to do?
> You decide upon a single style by whichever system you consider
> appropriate (company policy, team vote, team leader's discretion,
> etc), then require everyone else to follow it. If someone refuses to
> accept common coding standards on an issue as simple as formatting,
> the team is likely to be better off without them.
> This doesn't just apply to commercial development, either; even OSS
> projects will reject code which doesn't meet their formatting
sure. i agree that coding standards are important. if they weren't,
clearly it would be a non-issue... my supposition here is that you
want to find a style that pleases as many programmers as possible. i
see no reason to be intentionally frustrating... ;)
> > cvs always sees the same thing, and we're all happy. obviously, this
> > only works if indentation is used ONLY to indicate nesting depth and
> > NEVER to align text vertically at some specific column.
> That's a pretty big if. It's quite common to use tabs for aligning
> code or data which has a tabular form, i.e. multiple consecutive lines
> with a common overall structure (e.g. repeated calls to the same
> function with different actual arguments, array/list initialisers,
sure. in many cases it won't work, which is why, at my last job, we
settled on four spaces per indent, and eschewed tabs entirely. which
still doesn't mean that that's the One True indentation style!
matt hellige email@example.com