Boost logo

Boost :

From: David Bergman (davidb_at_[hidden])
Date: 2002-09-09 21:19:47


Terje,

I totally agree with you, if I dare say so...

People often use space characters, though, since that makes the exact
appearance of source code canonical, whereas a tab can be interpeted as
a variable indentation, character-wise.

I would definitely go with

        1. using tabs as indentation level markers
        2. recommending setting it to a certain number of characters
(such as 3) in situations where the exact appearance is important, e.g.,
in documentation and embeedded code in HTML pages.

I will withdraw from this discussion, though, since I do not want to be
"shut down" by (X)Emacs-powered power-Boosters ;-)

Regards,

David

-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Terje Slettebø
Sent: Monday, September 09, 2002 11:56 AM
To: boost_at_[hidden]
Subject: Re: [boost] Tabs creep back into source files

>From: "David Abrahams" <dave_at_[hidden]>

>From: "Terje Slettebø" <tslettebo_at_[hidden]>
>> The following have probably been covered before, but I didn't find a
>> rationale for it here (http://www.boost.org/more/lib_guide.htm). Why
>> are tabs banned in Boost libraries?

>Its roughly the same reasons as we format for fixed-width fonts.
>http://www.boost.org/more/lib_guide.htm#code%20fonts

That section says:

"Dave Abrahams comments: An important purpose (I daresay the primary
purpose) of source code is communication: the documentation of intent.
This is a doubly important goal for boost, I think. Using a fixed-width
font allows us to communicate with more people, in more ways (diagrams
are
possible) right there in the source. Code written for fixed-width fonts
using spaces will read reasonably well when viewed with a variable-width
font, and as far as I can tell every editor supporting variable-width
fonts also supports fixed width. I don't think the converse is true."

How does this apply to tabs? More or less all editors have support for
tabs, and for setting the tab size. Do you mean to say that because some
may use Notepad to write programs, others won't be able to benefit from
using the tab size they prefer?

>> If you use tabs for indentation, and spaces for alignment, there
>shouldn't
>> be any problem with it. Tabs have an advantage over spaces in that it
>would
>> then show the source using the tab spacing that you prefer, and it
>> would still be aligned correctly.

>Yes, but few editors give you tools for helping you with that, or for
>checking that you actually use that practice:

True.

>> Other advantages are:
>>
>> - They tell logically what it's about, while spaces carry no such
>> information.
>
>Huh?

What I meant is that a tab is kind of like markup information in the
source. The tabs tell that this is indentation.

As I understand, the reason for this is mostly that it's hard to check
that the practice is being followed. So tabs are banned, as that is
easier to check for.

Regards,

Terje

_______________________________________________
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