I have been reading style guides online and there is a good deal of disagreement regarding camel case.

Many people believe that it is harder to read readFromOpenFile as compared to read_from_open_file
and I have to agree.

However it is also nice to be able to tell the difference between the sorts of things one is dealing with for APIs where clarity of purpose is perhaps more important than scan-ability.

How about:

MACROS
ClassNames
memberFunctions
members_variables
local_variables
local_functions

Private and protected members with preceeding _ would be _member_variables.

The rational being that the ability to distinguish the sort of thing you are dealing with is most important for interfaces and non-local things which have diffuse context whereas strictly local names should be most readable. C styles (e.g. GNU) typically have all variables and functions named_like_this, and retaining this for local variables and functions makes the
code more appealing to crossover C programmers.

Just an idea.

john

Reply via email to