From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-09-09 12:23:58
Horizontal alignment is only a relative concept, not absolute. The indendentation width is easier adjusted as a per-user setting when using tabs, where as it is inflexible when spaces are embedded as a an attempt to communicate the indentation. It is like trying to manually center text vs letting the word processor calculate the text's placement.
Spaces are lowlevel, tabs are highlevel.
There just needs to be a standard of 1 tab per indentation, not two. If you like your indentation to be further, use a wider tab. It is no different then specifying 3 spaces for indendation vs 4 or 8. The unit of indentation is all that needs to be consistent, not the method of implementing it.
* Developer A of library has tabs set for 4.
* Developer B commits trivial fix. Developer B's editor had tabs set at 2,
but converted tabs on the changed line only to spaces.
It resulted in messed up source files."
If developer B uses tabs of 2, I can't possibly see how it is messed up. They purposely want their tabs at 2. "Messed up" is highly subjective. If the standard is to use tabs, then obviously, the standard must be that the tabs remain in the files, and editors that translate them are not allowed.
----- Original Message -----
From: David Abrahams
Sent: Monday, 2002:September:09 12:01
Subject: Re: Tabs creep back into source files
From: "Terje Slettebø" <tslettebo_at_[hidden]>
> How does this apply to tabs? More or less all editors have support for
> and for setting the tab size. Do you mean to say that because some may
> Notepad to write programs, others won't be able to benefit from using the
> tab size they prefer?
No, I'm saying that just as with variable-pitch fonts, when source code is
written using tabs it's much more likely that something the author intended
won't be properly communicated because it's harder to control horizontal
> >> - They tell logically what it's about, while spaces carry no such
> >> information.
> What I meant is that a tab is kind of like markup information in the
> The tabs tell that this is indentation.
> As I understand, the reason for this is mostly that it's hard to check
> the practice is being followed. So tabs are banned, as that is easier to
> check for.
Yes. In fact it's impossible to check programmatically whether the practice
is being followed. In general you need to know the author's intention in
order to discern how things were meant to be aligned.
David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk