What is a good standard for code width?
- by BillyONeal
Hello everyone :)
I've heard in several places that it's bad to have code that is too wide onscreen. For example:
for (std::vector<EnumServiceInformation>::const_iterator currentService = services.begin(); currentService != services.end(); currentService++)
However, I've heard many arguments for 80 character wide limits. I'm assuming this 80 character limit comes from the traditional command prompt, which is typically 80 characters wide. However -- most of us are working on something much better than a typical command prompt, and I feel that using an 80 character limit encourages use of variable names that are far too short and do not describe what the variable is used for.
What is a reasonable limit for a new project with no existing coding width standard?