Boost logo

Boost :

Subject: Re: [boost] coding conventions
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-01-04 09:27:36

Paul A. Bristow wrote:
> Mateusz Loskot wrote:
> > Michael wrote:
> > >
> > > 1) can lines exceed the 80 character limit?
> With the widespread use of wider screens, some Boost authors
> are already edging beyond 80 char width.
> >
> Perhaps we should relax the 80 char width recommendation?
> (and anyway it is only a recommendation? - Readability comes
> first?)

I constrain my code to 80 columns and have no problems with readability, though I can imagine those used to long lines might. Long lines are quite difficult to read in my preferred editor configuration. A highly subjective criteria like readability is troublesome as justification for relaxing the width restriction.

Using proportional fonts increases the opportunity for text to exceed a given screen width depending upon the viewer's selected font. One person using a small or tight proportional font and a high screen resolution or large screen will easily exceed the screen width of another person using a looser or larger font or a screen with lower resolution or smaller width. Using 80 columns as the limit ensures that regardless of the font, it will fit on any developer's screen and the printed page without wrapping or truncation.

I happen to like arranging two buffers (file views) side-by-side in a single window and often have two such windows up at once (dual monitors). That allows me to have as many as four 80-column files visible at once. There are other configurations and not everyone does what I do, but the point of the Guidelines is "Boost's widely distributed source code should follow more conservative guidelines."

> PS Using 2 space indentation reduces the risk of running over
> the 80 width, so is my preference.

Some find two too small to visually align vertically, but four limits indentation depth, so we've used three for years. (Gasp! Yes, three isn't a power or multiple of two, but it works well.)

Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

Boost list run by bdawes at, gregod at, cpdaniel at, john at