|
Boost : |
From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-06-22 18:54:43
From: Beman Dawes <bdawes_at_[hidden]>
> At 06:40 PM 6/22/2001, Greg Colvin wrote:
>
> >The safe rule is not to use leading underscores, although I
> >think those above are technically OK, if useless.
>
> Why? Lots of programmers (me included) use a single leading underscore in
> private member names. It never causes any problems, and is completely
> standard conforming.
So long as you remember not to follow the underscore with
a capital letter.
Also, some shops use a leading underscore for unavoidable
variables in statement macros that might interfere with
other names. I know, don't use macros ...
> That choice was based in an experiment some years ago trying several
> candidates (including none, trailing underscore, and some others I can't
> remember.) Leading underscore won.
OK. I still dislike such warts. But I've quoted the
standard so people can choose accordingly.
> --Beman
>
> >17.4.3.1.2 Global names [lib.global.names]
> >
> >1 Certain sets of names and function signatures are always reserved to
> > the implementation:
> >
> > --Each name that contains a double underscore __) or begins with an
> > underscore followed by an uppercase letter (_lex.key_) is reserved
> > to the implementation for any use.
> >
> > --Each name that begins with an underscore is reserved to the imple-
> > mentation for use as a name in the global namespace.22)
> >
> > _________________________
> > 22) Such names are also reserved in namespace ::std (_lib.re-
> > served.names_).
>
>
> Info: http://www.boost.org Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk