This page is still under construction

This page contains a collection of suggestions for what to think about when writing code-level documentation. The documentation in code falls into two categories, described in separate sections below.

Interface documentation

Interface documentation consists of the header comments for files, classes, and methods. Its purpose is to support abstraction: the creation of reusable modules with simple interfaces that hide complex internals. It should be much easier to use a module than to understand its implementation. The module's documentation describes its interface.

Implementation documentation

These comments are intended to help developers understand how code works internally. It includes documentation in the bodies of methods plus documentation of member variables in classes, which are usually private.

Overall suggestions

The following suggestions apply to both implementation and interface documentation.