[Bf-committers] line length / code style.
aligorith at gmail.com
Mon Dec 19 11:24:18 CET 2011
Over the weekend, I've posted my thoughts on a few of these issues .
Regarding your proposal, I agree with most of the issues brought up. HOWEVER,
1) I prefer the version of comments with a starting indicator on each
line + closing on a separate line. Apart from having seen it used all
over the place in the past, main advantage that it is clear at a
glance whether some text is part of a comment (regardless of whether
syntax highlighting is on). Probably not such a biggie these days as
every self respecting text editor has syntax highlighting, though the
one without just feels like "guts leaking out into the void".
2) Spacing *should* be used between a builtin keyword and an opening
brace. Keywords != function calls.
3) Assignment operators: my opinion of this has varied in the past,
though I'm now tending towards the "a = b" (NOT "a= b") camp. While
easier to type the second version, it doesn't hold up that well for
compound assignment (+=, -=, and friends). However, it should also be
noted that Python's PEP8 (which we use for our scripts) explicitly
states for this case that there should be spaces.
4) Trailing whitespace - make sure you get your definition of
"trailing" correct. If it's the defined by the lazy implementation of
most text editors, then I'd have to disagree with enforcing it ;)
On Mon, Dec 19, 2011 at 10:54 PM, Sergey Sharybin <sergey.vfx at gmail.com> wrote:
> I've prepared first draft of code style guideline . Of course it needed
> to be finished and probably more adopted for existing code style in
> Blender, i'll continue working on this. Want to have feedback from active
> debelopers about things from rules needed to be discussed section.
> Also feel free to propse changes to existing tips or propose new tips.
>  http://wiki.blender.org/index.php/User:Nazg-gul/CodeStyle
> With best regards, Sergey Sharybin
> Bf-committers mailing list
> Bf-committers at blender.org
More information about the Bf-committers