What is a good standard for code width?

Posted by BillyONeal on Stack Overflow See other posts from Stack Overflow or by BillyONeal
Published on 2010-03-20T19:43:55Z Indexed on 2010/03/20 20:11 UTC
Read the original article Hit count: 169

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about language-agnostic

Related posts about width