|
Boost : |
Subject: Re: [boost] coding conventions
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2010-01-04 10:09:40
On Mon, Jan 4, 2010 at 8:08 AM, OvermindDL1 <overminddl1_at_[hidden]> wrote:
> On Mon, Jan 4, 2010 at 7:27 AM, Stewart, Robert <Robert.Stewart_at_[hidden]> wrote:
>>> PS Using 2 space indentation reduces the risk of running over
>>> the 80 width, so is my preference.
>>
>> Some find two too small to visually align vertically, but four limits indentation depth, so we've used three for years. Â (Gasp! Â Yes, three isn't a power or multiple of two, but it works well.)
>
> I have always been curious about that. Â To me it makes *no* sense to
> use spaces for indentation. Â I always use tabs for indentation and
> spaces for alignment, my reasoning is that you can set tabs to be any
> size you want in your editor, one space if you wish even, and spaces
> for alignment just makes sense, for example:
> class myClass : public anotherClass
> {
> public:
> Â Â Â Â float f_;
>
> Â Â Â Â myClass(std::string s // assume we need to wrap due to being too long
> Â Â Â Â Â Â Â ,float f) // aligned with spaces after being tabbed equal to
> the above line
> Â Â Â Â Â Â Â Â :anotherClass(s) // indented with tabs
> Â Â Â Â Â Â Â Â ,f_(f)
> Â Â Â Â {
> Â Â Â Â Â Â Â Â // do stuff, two tabs
> Â Â Â Â }
> }
And of course the email client converted my tabs to 8 spaces, but you
get the idea...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk