[Bf-committers] line length / code style.

Brecht Van Lommel brechtvanlommel at pandora.be
Mon Dec 19 13:37:30 CET 2011


Hi,

On Mon, Dec 19, 2011 at 1:00 PM, Bastien Montagne <montagne29 at wanadoo.fr> wrote:
>>> 2) Spacing *should* be used between a builtin keyword and an opening
>>> brace. Keywords != function calls.
>>>
>> I wouldn't be so categoric here and say "it might be used". Reading code
>> from BKE/BLI i didn't see way which is more preferable atm. Reason of
>> current state of this tip is simple: in most of modules i was working,
>> spaces weren't used much after keyword. It's not so big deal to replace
>> that tip to "space shoudl be used", but imo it'll worth asking other devs
>> and if most of devs are fine with such change -- it'll be changed :)
> Well, on this point I don’t have a strong opinion, though I tend to use
> the "no space" style…

I prefer no space, don't see why there should be a difference because
one is a keyword and the other a function call, it's still just an
arbitrary choice. But I can live with the proposed coding style up to
now.

Another inconsistency is in variable/function/struct/macro names. The
rules there tend to be variables lowercase (often without _ separator
but not always), functions also lower case (with _ separator) except
for the module prefix, structs camel case starting with capital
letter, and macros all uppercase (with _).

I'd love to see existing code changed to enforce all this, and
personally wouldn't mind it adding an extra step to svn blame, but not
everyone might agree with that.

Brecht.


More information about the Bf-committers mailing list