>but IMO this is a stylistic choice, and I usually prefer the former, as it prevents mistakes like:
>
>if (depth == 0)
> luasdorintf("%-5i | ", stackIndex);
>else
> luasdorintf(" ", stackIndex);
> do_another_thing(); //oops, not conditional
Well, as for me, it's not a matter of preferences. I've been facing a lot of issues with this unconditional 'do_another_thing' in somewhat large projects with 5+ developers. So, for me it's not a style, but the guideline. Fun fact, it is not so for linux kernel, as stated in chapter 3 of the linux kernel coding style. I guess that's where this idea comes from mostly. However, for all us non-hackers, the safest approach is the best IMO. Plus, even if you are cautious enough, placing the braces in advance allows to minimize the patch size and layout when adding another statement. This is particularly true for K&R braces, because in this case adding the damn brace will trigger the condition line to be "changed" as well.