Skip to content

Code Guidelines

John Michael Gross edited this page Jul 6, 2017 · 5 revisions

Naming Conventions

  • Types: PascalCase
    • Prefix interfaces with "I"
  • Methods: PascalCase
  • Non-Private Members: PascalCase
  • Private Members: _camelCase

Code Design

  • No public fields except for consts, use properties instead
  • No stateful static types. These are a pain to clean up, static types should not store any information.
  • Use dependency injection when possible. Most Torch code uses constructor injection.

Clone this wiki locally