3 ms·
I program in C++ and not C, but in my opinion, unless we are talking about a very small project, it is even wrong to have a global variable, not to mention nami
by greyman 16y ago
I program in C++ and not C, but in my opinion, unless we are talking about a very small project, it is even wrong to have a global variable, not to mention naming it maxphysaddr! If it is some utility with 50 lines of code, then ok, but otherwise it's a maintenance nightmare to have such names.
As a local variable, it is ok to have "ii" for loops or "p" for pointers, though.
- eru 16y agoGlobal variables are semi-OK as long as you don't mutate them. Lots of project have global functions and global classes, and nobody cares.