void complicated_calculation() {
doub radius = 3;
//...many lines of branching logic
//..
drawCircle(x,y,radius); // radius still 3? who knows?
}
Reader: You puzzle me with your branching logic.
void complicated_calculation() {
const doub radius = 3; //<<<< NOW CONST.
//...many lines of branching logic
//..
drawCircle(x,y,radius); //<<<< radius still 3.
}
Using similar naming and format conventions system wide allows abbreviations to become a form of shorthand, free of superfluous clarification or comments. typedef iterator iter
i,j,k for iterator names. #if 1
//.. code under development
#endif
Qualified namespaces in code files (as opposed to header files) can clarify, especially if names are short. #include "myfile.h"
using std;
Reader: Don't type so much.
Bim: It's just so fun.
nedwaves.com 2017 [171108]