Bracket Conventions

Started by
5 comments, last by davidx9 19 years, 7 months ago
Sorry to be a copycat, but I just have to know which style most people use for coding in C/C++. With all these debate threads (naming conventions, char* vs. string), I thought maybe we should talk about something that really matters [wink]. Brackets! Also do you use tabs or spaces for indentation. I use: [cool]

function()
{
     // Tab
}


I like the way the brackets line up.
Advertisement
I use this:

int Blah( int thing0, int thing1, int thing2 ){	thing0 = thing0 + ( thing1 * thing2 );	somearray[ thing2 ] = thing1 / thing0;	return SomeFunc( somearray[ thing2 ] );}


I seperate almost everthing with a space so as that the code is clean and easy to read.
def foo():  bar() # two spaces - which becomes the only thing to argue about, really.
There's not much to say about brackets. I use foo[bar] = 42.
I use the One True Brace style :) with tabs for indentation, that are displayed as four spaces by my editor.
I use tabs instead of whitespace.

Literally, I never use the Spacebar.
Presumably, you've all hit a brick wall with your projects if you've got time to reply to this thread...


Yes, i have hit a brick wall.

I'm entering the "More Coffee" phase of development, quickly approaching the "I Hate Stupid Vertex Buffers" phase.
No bombs, No guns, just an army of game creators...

This topic is closed to new replies.

Advertisement