Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Coding Standards

Z edited this page Jul 24, 2014 · 2 revisions

When in Rome, do as the Romans do

Prime directive: When uncertain, follow the conventions of the code around you.

C++

Style in Snow Crash

  • soft tabs (spaces)
  • 4 spaces per tab
  • UpperCamelCase
    • types (including class & structs) class Foo
    • global function void Foo()
  • lowerCamelCase
    • variables, instances int foo
    • class & struct methods Foo::bar()
  • absolutely no hungarian notation
  • one space after a comma foo(int a, char b)
  • one space parentheses and trailing braces if (true) {}

Additional Read