|
Boost : |
From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-09-09 18:41:17
Yeah, but comments should be rare, and most importantly they should be ugly,
just like reinterpret_cast<> was intended to be, to make sure that problem
that is commented about is hopefully fixed ASAP.
Therefore, they SHOULDN'T ALIGN. They should cause the reader much pain!
----- Original Message -----
From: Terje Slettebø
Newsgroups: gmane.comp.lib.boost.devel
Sent: Monday, 2002:September:09 19:30
Subject: Re: Re: Tabs creep back into source files
>From: "William E. Kempf" <williamkempf_at_[hidden]>
>From: "Terje Slettebø" <tslettebo_at_[hidden]>
>> Note that the arguments in the article against tabs (alignment problems)
>>are fixed by using spaces for alignment, and you _still_ get the tab size
you
>> want.
>Mixing tabs (for indentation) and spaces (for alignment) doesn't work in
>many cases.
>
><tab>if (foo)<sp><sp><sp>// If foo is true
><tab><tab>bar();<sp>// then call bar
>
>If <tab>s are specified as 4 spaces in your editor then these comments
align
>correctly, but if the <tab> is another size (like 3) it likely won't.
>Alignments on lines that are indented the same work, but if the alignment
>must span lines that have differring indentations (which isn't that
>uncommon) then use of tabs causes problems here.
This was also addressed in the article that John Levon posted a link to.
Yes, in this case, the comments won't align correctly. That's a consequence
of being able to set any tab size.
>There's pros and cons in both directions. I think spaces are a better
>answer, but in any event, historical reasons indicate we aren't likely to
>change now unless there's a clear winner in the decision to switch to tabs,
>which there won't be.
For your own projects, you may use whatever you want. And for cooperative
projects, tabs/spaces is just one of many elements that may differ from
preference to preference. As I said in another posting, you tend to learn to
adapt. So I've written in all kinds of styles, adapting to the existing
convention, so that it would fit with the rest of the code.
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