Nokternel Style Guide

Style is the most useful thing ever.

Here's how I'm doing it right now:


All code should be formatted this way.

1 Variables

1.1 General naming conventions

1.1.1 Member variables

A member variable is a variable that belongs to a class. For example, the class Character might have the integer variable Health. A member variable should be CamelCased.

1.1.2 Parameter variables

A parameter variable is a variable passed to a function. A parameter should be CamelCased.

1.1.3 Local variables

A local variable is a variable declared within a function body. A local variable should be lowerCased.

1.2 Delegates and Callbacks

Delegates and callbacks are some of the trickiest elements to name. The following approach is designed to provide clear indications for each item.

1.2.1 Delegates

Delegates should be defined in the past tense and should end with ed. They should not begin with the term On.

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FEventOccurred); FEventOccurred EventOccurred;

1.2.2 Callbacks

Callbacks should be defined in the past tense and should begin with On and end with ed.

void OnEventOccurred();