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