kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #04412
Code Style (Re: Graphics Abstraction Layer)
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
"Torsten Hüter" <torstenhtr@...>
-
Date:
Thu, 25 Feb 2010 23:09:01 +0100
-
In-reply-to:
<4B847B16.5090106@...>
Hi Dick,
> Style is important to Wayne and me, and I assume Jean-Pierre, and we
> will be releasing a coding style document *very* soon.
Style is very important to me too - we had during my studies and in our company enough discussion about this point. Currently we found the compromise, the typical JAVA-style.
My question is, because the KiCad style looks a bit unusual to me and it's not consistent. I'd like to know if there was a voting or if this was a personal preference. The code style should be clean, logic and commonly used in my opinion.
However, I have no big problem to adapt myself to the KiCad code style (like I've done for the patches).
> Notice that our classes are all uppercase, at least the new ones.
Perhaps you could elaborate on this topic - I see the problem that a class written all uppercase could be confused with a constant and you need an underscore which I don't like.
MY_CLASS, MY_CONSTANT
I like this:
MySpecialClass
MyType
myMemberFunction()
_privateVariable
MY_CONSTANT
However, I've learned Java at the university, this explains perhaps my choice.
http://java.sun.com/docs/codeconv/
QT seems to use this style too.
As code beautifier I'm used to Eclipse CDT's build in variant, but I'll have a look at uncrustify.
Thanks ..
Torsten
--
GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
http://portal.gmx.net/de/go/dsl02
Follow ups
References