Open Source & Linux Lab

It's better when it's simple

User Tools

Site Tools


etc:blogs:kkv:short_c_coding_style_guidelines

short c++ coding style guidelines

They say

  • Tabs are set every three spaces.
  • Variable and function names are lowercase.
  • Constant names are uppercase. Class names start with an uppercase letter.
  • There are spaces after reserved words and between binary operators.
  • Braces must line up.
  • No magic numbers may be used.
  • Every function must have a comment.
  • At most 30 lines of code may be used per function.
  • No goto, continue, or break is allowed.
  • At most two global variables may be used per file.

Discussion

осьмилис, 2009/08/07 16:48

Last 2 rules are quite shitty. BTW, are multiple returns in one function allowed?

kkv, 2009/08/07 16:52

I agree regarding next to last one.

jcmvbkbc, 2009/08/08 15:39

My bison says that your grammar is ambiguous.

kkv, 2009/08/10 11:54

I have no bisons…

You could leave a comment if you were logged in.
etc/blogs/kkv/short_c_coding_style_guidelines.txt · Last modified: 2009/08/06 16:44 by kkv