D tries to integrate important parts of modern software engineering directly into the language. Besides contract programming and unit testing D allows documentation to be natively generated from your source code.
Using a standard schema for documenting types
and functions the command
dmd -D conveniently
generates HTML documentation based on the source
files passed on the command line.
In fact the whole Phobos library documentation
has been generated with DDoc.
The following comment styles are considered by DDoc for inclusion into the source code documentation:
/// Three slashes before type or function
/++ Multiline comment with two + +/
/** Multiline comment with two * */
Have a look at the source code example to see some standardized documentation sections.