On 1/19/07, James Rosten <seinfeld90@gmail.com> wrote:
Just how lenient are you on the spaces in conditionals and loops thing :P ? Like: for ( int i = 0; i; ++i ) {
I haven't figured that one out in the scope of this codebase, so we'd have to ask judd about that. Personally, I prefer no spaces between the token and opening paren, and spaces after each ; and between operators: for(int i = 0; i && i < 4; ++i) But that's just my preference. I also prefer to align args oddly in the case of newlines: if(x == 4 && y == 7 && z > 23) { But again, there's no concise "ruling" on that, so I say do what feels best.
Also, I'm kind of curious to know whats behind the return(0); instead of return 0; decision. I'll do it like a function, but I'm just curious.
I'm not entirely sure of that myself. I'm one of those people who doesn't force a coding style into something, and that's just the way 95% of the pacman code does it.... you'd have to ask judd (if he's even alive, heh).