[Bro-Dev] whitespace convention (tab vs. space)

Jonathan Siwek jsiwek at ncsa.illinois.edu
Wed Apr 20 19:06:50 PDT 2011

> int myClass::Method(int foo, char* bar,
> <tab><tab> int another_argument)
> where if you expand those tabs, you'll find that the "int" for
> "another_argument" is right below the "int" for "foo".

But then the alignment depends on tab width, right?  If we're going to use that style, we should all agree on what that width is.

Another way to do it is having the continuation line(s) contain a number of tabs equal to the level of indentation plus however many spaces are necessary to get the right alignment.  Then everyone would write code that aligns the same regardless of what tab width they're using.  So in the example Vern gave, there wouldn't be any tabs, just spaces because the indentation level of that code is 0.

- Jon

More information about the bro-dev mailing list