please stop messing with the indentation
Matt Austern
austern@apple.com
Thu Aug 8 10:02:00 GMT 2002
On Thursday, August 8, 2002, at 09:35 AM, Nathan Myers wrote:
> On Wed, Aug 07, 2002 at 06:46:30PM -0700, Benjamin Kosnik wrote:
>>
>>> I find the un-indented version pretty much unreadable.
>> FWIW, I also like the indentation.
>
> I vote for unindented namespace-level declarations, except
> where namespace manipulations are the whole point (as in some
> forwarding headers). Likewise for extern "C" blocks. On the
> closing "}" for such a block, a comment // namespace std
> or "// extern "C" is called for.
I vote for one of the these two options:
(1) Don't indent names in a namespace when everything in the file
is in that namespace (basically what Nathan says, and I also
agree with him about the comment for the closing brace).
(2) Keep it as is, but raise the line length limit to 90 characters or
so.
My preference is for #1, but I wouldn't mind #2 too much.
My main objections to indenting things at namespace scope are that
it gives me information I already had (I know that things in <iostream>
are in a namespace!), and that it uses 2.5% of my precious line length.
Raising the line length limit wouldn't make indentation more useful,
but it would make indentation less harmful.
--Matt
More information about the Libstdc++
mailing list