Phobos coding conventions

From D Wiki
Revision as of 23:38, 10 December 2012 by Quickfur (talk | contribs) (stub)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If you're planning to submit pull requests for druntime or Phobos, you should follow the following coding conventions:

  • Avoid using the tab character.
  • Use 4-space indentation.
  • For blocks enclosed by curly braces ({}), the opening brace should be on its own line, at the same indentation level as its containing block:
void main(string[] args)
{
    if (args.length == 0)
    {
        writeln("Please specify filename");
    }
    else
    {
        lotsOfDotDotDotMagic(args);
    }
}