Re: C++ Guidelines
Pete Vidler wrote:
[color=blue]
> Hi Folks,
>
> I'm wondering if there is a compilation of C++ guidelines out there
> anywhere. Here are some of the ones I've picked up so far (as examples):
>
> - Functions should fit on one screen, from various sources.
>
> - Non-leaf classes should be abstract (have pure virtual methods), from
> More Effective C++, Item 33.
>
> - Virtual methods should be private by default and protected if they
> need access to a base classes version (except for the destructor, of
> course), from http://www.gotw.ca/publications/mill18.htm.
>
> - Header files should be self contained, from various sources.
>
> - Destructors for base classes should be either virtual or protected.
>
> I think I've probably missed (or never heard of) quite a few more.
> Anyone know where I can find such things? Or have some guidelines of
> their own to share?
>
> -- Pete[/color]
Zawinski is known for being a bit off the wall, but he also wrote everything
from the keycaps program, through a good deal of the XEmacs code, and to a
lot of the code in the original Mozilla (aka Netscape). Consider the love
affair between Netscape and Microsoft when you read his review of _Writing
Solid Code_:
I haven't read any of the books cover to cover, and cannot provide
assessments of the reviews. It just seemed like a resource worth sharing.
--
STH
Hatton's Law: "There is only One inviolable Law"
KDevelop: http://www.kdevelop.org SuSE: http://www.suse.com
Mozilla: http://www.mozilla.org
Pete Vidler wrote:
[color=blue]
> Hi Folks,
>
> I'm wondering if there is a compilation of C++ guidelines out there
> anywhere. Here are some of the ones I've picked up so far (as examples):
>
> - Functions should fit on one screen, from various sources.
>
> - Non-leaf classes should be abstract (have pure virtual methods), from
> More Effective C++, Item 33.
>
> - Virtual methods should be private by default and protected if they
> need access to a base classes version (except for the destructor, of
> course), from http://www.gotw.ca/publications/mill18.htm.
>
> - Header files should be self contained, from various sources.
>
> - Destructors for base classes should be either virtual or protected.
>
> I think I've probably missed (or never heard of) quite a few more.
> Anyone know where I can find such things? Or have some guidelines of
> their own to share?
>
> -- Pete[/color]
Zawinski is known for being a bit off the wall, but he also wrote everything
from the keycaps program, through a good deal of the XEmacs code, and to a
lot of the code in the original Mozilla (aka Netscape). Consider the love
affair between Netscape and Microsoft when you read his review of _Writing
Solid Code_:
I haven't read any of the books cover to cover, and cannot provide
assessments of the reviews. It just seemed like a resource worth sharing.
--
STH
Hatton's Law: "There is only One inviolable Law"
KDevelop: http://www.kdevelop.org SuSE: http://www.suse.com
Mozilla: http://www.mozilla.org
Comment