Naming and layout suggestions
NL.26
Use conventional `const` notation
Reason
Conventional notation is more familiar to more programmers. Consistency in large code bases.
Example
const int x = 7; // OK
int const y = 9; // bad
const int *const p = nullptr; // OK, constant pointer to constant int
int const *const p = nullptr; // bad, constant pointer to constant int
Note
We are well aware that you could claim the "bad" examples are more logical than the ones marked "OK", but they also confuse more people, especially novices relying on teaching material using the far more common, conventional OK style.
As ever, remember that the aim of these naming and layout rules is consistency and that aesthetics vary immensely.
This is a recommendation for when you have no constraints or better ideas. This rule was added after many requests for guidance.
Enforcement
Flag const used as a suffix for a type.