Dokumentácia zdrojov

D tries to integrate important parts of modern software engineering directly into the language. Besides contract programming and unittesting D allows to natively generate documentation out of 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 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.

In-depth

rdmd playground.d