locale/file/style questions

Chip Salzenberg chip@perlsupport.com
Thu Dec 30 07:30:00 GMT 1999


According to Benjamin Kosnik:
> 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. Any comments?

Allow me to elaborate on my original comment...

I always write classes in this order:

   Default constructor
   Other constructor
   Destructor
   Assignment operator

   Public member functions

   Protected members

   Private members

Sometimes this order requires a few private/public tags in the
ctor/dtor/assign section at the top, but basics of object construction
are important enough that they always belong at the beginning.

Details of other items (friends, ordering of member functions, etc.)
I play by ear.
-- 
Chip Salzenberg      - a.k.a. -      <chip@perlsupport.com>
      "When do you work?"   "Whenever I'm not busy."



More information about the Libstdc++ mailing list