You can have different naming convention for class members, static objects, global objects, and structs. Some of the examples of them are as below.
_member m_member
or in Java case, the usage of this.member.
But is there any good technique or naming convention for function variables scope that conveys when a single variable has complete function scope or a short lifespan scope?
void MyFunction() { int functionScopeVariable; if(true) { //no need for function variable scope naming convention } }
We tend to use an l_ prefix in our functions for ‘local.’ And, that’s worked pretty well.