Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-03-17 10:04:48

From: <williamkempf_at_[hidden]>
> ... There are
> five styles I've seen used, each rubs me wrong for different reasons:

Make that six.

  name: Also commonly used, short, readable, no conflicts.

> m_name: This makes the variable name longer and harder to read to me,
> even though coming from the MS world I'm very used to it. I just
> don't like the embedded underscore here. This is awfully nit picky,
> yes, so when I do use warts this is often the one I use.
> mname: Fully unreadable.
> mName: Readable, but I prefer not using mix case, which I believe was
> mentioned in the Boost guidelines as well, though I could be
> remembering this wrong.
> _name: As Dave pointed out this is only safe in the context of class
> variables. Granted, that's precisely what the wart is supposed to
> indicate, but it still feels wrong to use a wart that's restricted in
> some cases.
> name_: Don't know why, but this one really bugs me. It looks like
> someone just didn't finish typing out the variable name here.

And name_ is commonly used in macro expansions to avoid conflicts
with user names.

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