C++: why 80 charachters??

T

Thomas Matthews

John said:
I write code as long as 250+ columns sometimes (when the code refers to
a single concept), and I don't understand why people complain about
that. Just use the word wrap, right?

People who write 80 columns force everybody else in the world to see
their code in a narrow stripe of screen, when almost every programmer
nowdays has 1280x1024+ screen resolution. Many have 1600+!

If the algorithm does not fit into one screen, you are going to make
mistakes when writing or reading it. Losing 2/3 of the screen to stay
into 80 charachters seems nonsense to me.

Many people actually code to 70 columns or less. As Claudio pointed
out, this is for printing purposes. When we hold code reviews, we
send out hard-copies with line numbers so that everybody can refer
to the same line number. Reviews are very hard to conduct when the
code is truncated off of the right margin.

Why not the shorter width? A lot more lines (hmmm, improves those
Lines Of Code metrics) but compilers ignore all that whitespace.
One of the major tenets of programming is to make your program
readable, especially to people who don't have the exact same
workstation as you do.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Short Questions on C++ 6
terminal designed for C 47
Why C? 33
Why replaceSelection in JTextPane is not behaving safely? 4
Why C? 33
Why Python 3? 5
c 0
untold truth about C++ 3

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,439
Latest member
shasuze

Latest Threads

Top