Boost logo

Boost :

From: Nathan Myers (ncm_at_[hidden])
Date: 2001-12-29 21:52:07


On Sat, Dec 29, 2001 at 01:00:36PM -0800, Darin Adler wrote:
> > 1) I've noticed many member variables for boost libraries end with
> > an underscore. Is this a defacto-standard? Should a standard care
> > about such things?
>
> Although some would say that this is not something we'd want to
> standardize, the Boost coding guidelines draft does suggest an "m_"
> prefix rather than an "_" suffix.

This recommendation grows out of experience with the "_" suffix.
It's just too hard to see it, and too easy to miss typing it.

It also fails the "telephone test" -- how do you pronounce the
underscore suffix? The "m_" prefix may be pronounced "member".

> > 2) while(true) {

The guidelines demand a space after the "while" keyword to visibly
distinguish the statement from an (otherwise similar) function call.

Nathan Myers
ncm at cantrip dot org


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk