A funny quotati…

A funny quotation from http://wiki.openstack.org/CppCodingStandards

FIXME: Desc says they should be PascalCased but example says they shouldn’t.

Class names should be PascalCased and should adequately describe the object, with as little abbreviation as possible. Where necessary, acronym’d parts of a class name should be kept in all uppercase.

Prefixing (such as prefixing all classes with Cls) is to be avoided.

For abstract base classes, it is encouraged to name the class with an adjective that illustrates the interface’s main purpose. For instance, an abstract base/interface class that describes a class type that can be interrupted by a signal could be called interruptible

Acceptable examples:

Toggle line numbers

   1 class sql_client; // describes an object acting as a client to a SQL store
   2 class interruptible; // an interface class describing a type of object that
   3                         can be interrupted by some signal

Poor examples:

Toggle line numbers

   1 class SqlClient; // Don't use PascalCased or camelCased names
   2 class cls_client; // Don't use useless prefixes!
   3 class tool; // Doesn't describe anything.  A tool which does '''''what'''''?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s