Difference between revisions of "Talk:Coding style"

From Code::Blocks
(Hungarian notation)
m (Moved first question to a section, content indexed correctly now)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
How about comments?
+
== How about comments? ==
  
 
Well I'm not an developer. It is pretty safe to say use "//" (C++ style) comments, and not the C style ones.
 
Well I'm not an developer. It is pretty safe to say use "//" (C++ style) comments, and not the C style ones.
Line 20: Line 20:
  
 
It is not very clearly stated, but it looks that [http://en.wikipedia.org/wiki/Hungarian_notation Hungarian notation] should be used in the names of variables.
 
It is not very clearly stated, but it looks that [http://en.wikipedia.org/wiki/Hungarian_notation Hungarian notation] should be used in the names of variables.
 +
 +
== Should namespaces be used ==
 +
 +
What about namespaces?
 +
 +
While implementing a plugin, I started wondering if we should put the plugin in a separate namespace.
 +
 +
As there is nothing specified, I did it anyway, but I think it might be a good idea for C::B to use namespaces.

Latest revision as of 20:43, 27 May 2007

How about comments?

Well I'm not an developer. It is pretty safe to say use "//" (C++ style) comments, and not the C style ones.

AStyle, should it be on ANSI?

As the AStyle plugin keeps changing the code, shouldn't AStyle have a specific C::B setting?

As ANSI is given as the standard, it would be nice to have a specific ANSI version for C::B development and plugin development.

Don't know if and how this can be done, but that would be very handy to have.

CamelCase

From the article it seems CamelCase should be used for all variable and function names.

Don't know if there should be something more specified like UpperCamelCase for functions and member variables, lowerCamelCase for other variables and function parameters.

Hungarian notation

It is not very clearly stated, but it looks that Hungarian notation should be used in the names of variables.

Should namespaces be used

What about namespaces?

While implementing a plugin, I started wondering if we should put the plugin in a separate namespace.

As there is nothing specified, I did it anyway, but I think it might be a good idea for C::B to use namespaces.