This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: locale/file/style questions
- To: libstdc++-v3@cygnus.com
- Subject: Re: locale/file/style questions
- From: Nathan Myers <ncm@best.com>
- Date: Fri, 8 Jan 1999 14:48:39 -0800 (PST)
> > I suggest that everything public should be before everything private.
> > That way consumers can read from top down and stop when they see
> > that the rest of the class definition is private, thus of no concern.
>
> I posted the original comment just to see if
> anybody had any strong feelings, or any particular technique that was
> working well for their own code.
In general, for public classes, typedefs first, other public stuff next,
then protected, and private last. A typedef needed only for a single
function or group of them might go next to the function.
The goal is, keep the private stuff out of the way; otherwise,
make the class definition understandable to users.
Guidelines can help at this, but when they interfere it must be
the guideline that yields.
Nathan Myers
ncm@cantrip.org