3 ms·
One suggestion: In documentation and comments, distinguish clearly between "const" and "constant". "const" means "read-only", and probably should have been spe
by _kst_ 4y ago
One suggestion: In documentation and comments, distinguish clearly between "const" and "constant".
"const" means "read-only", and probably should have been spelled "readonly".
"constant", as in "constant expression", means evaluated at compile time.
For example: `const int r = rand();` is perfectly valid: r can't be computed until run time (it's not constant), but it can't be modified after its initialization (it is const/readonly).