Skip to content

Code guidelines

Ivan Schütz edited this page Mar 24, 2020 · 4 revisions
  • Use Swift.
  • Keep it simple!
  • Keep functions and classes reasonably short.
  • Minimize side effects.
  • Avoid force unwrap.
  • Minimize usage of implicitly unwrapped optionals. Only IBOutlet and similar.
  • Prefer composition over inheritance.
  • Prefer immutability.
  • Prefer explicit type declarations for instance variables.
  • Use readable names.
  • If something is difficult to understand, add some documentation.
  • Preferred to avoid storyboards (open to discussion)
  • Prefer XIBs. For now use SwiftUI only for simple UIs or if feeling confident that there will be no bugs.
Clone this wiki locally