Subject: Re: commit
From: Frodo Looijaard (frodol@dds.nl)
Date: Mon Jan 01 2001 - 10:53:12 CST
Jesper Skov wrote:
>
> >>>>> "WJCarpenter" == WJCarpenter <bill-abisource@carpenter.ORG> writes:
>
> Mike> Please respect the AW coding guidelines, tab=4. And we're *not*
> Mike> using the GNU indentation style.
>
> WJCarpenter> I'm always confused by this sort of comment. Why isn't
> WJCarpenter> it "use tabs (not spaces) for indent, and set tabs to be
> WJCarpenter> whatever you happen to prefer"? Is there some important
> WJCarpenter> case where it would matter to you if I set tabs to
> WJCarpenter> display as 6 spaces? Couldn't you still see them as 4
> WJCarpenter> spaces wide inside your editor of choice? --
>
> Only if everybody always use TABs - and that is not the case, nor a
> requirement in the source code guidelines. Maybe it should be?!?
Ideally, one should use tabs for the indentation part, and spaces for
other lining-up. For example:
int exampleFunc (thisIsAVeryLongTypeNameAsWeHaveLotsOfInAbiWord para1,
[SPACES.........]theSecondParameter para2)
{
[TAB]someStatement()
[TAB]if (somethingIsTrue) {
[TAB][TAB]DoSomethingVeryIntricateWithLotsOfParameters(Parameter1 a,
[TAB][TAB][SPACES.....................................]Parameters b);
[TAB]}
}
If everybody would remember to do it like this, than tab length would
be a non-issue (except for maximum linelengths, of course). Perhaps there
is some kind of indent program for C++ that can handle this, but I know
of none.
Good luck,
Frodo
-- Frodo Looijaard <frodol@dds.nl> PGP key and more: http://huizen.dds.nl/~frodol Defenestration n. (formal or joc.): The act of removing Windows from your computer in disgust, usually followed by the installation of Linux or some other Unix-like operating system.
This archive was generated by hypermail 2b25 : Mon Jan 01 2001 - 10:53:21 CST