swift

Installation
SKILL.md

Swift Style Guide

Naming

  • Use UpperCamelCase for type and protocol names, and lowerCamelCase for everything else.

  • Name booleans like isSpaceship, hasSpacesuit, etc. This makes it clear that they are booleans and not other types.

  • Acronyms in names (ID, URL, etc) should be all-caps except when it’s the start of a name that would otherwise be lowerCamelCase, in which case it should be uniformly lower-cased.

  • Event-handling functions should be named like past-tense sentences (e.g. didTap, not handleTap). The subject can be omitted if it's not needed for clarity.

  • Avoid Objective-C-style acronym prefixes. This is not needed to avoid naming conflicts in Swift.

Style

  • Don't include types where they can be easily inferred.

  • Prefer letting the type of a variable or property be inferred from the right-hand-side value rather than writing the type explicitly on the left-hand side.

Installs
1
Repository
maragudk/fabrik
GitHub Stars
26
First Seen
3 days ago
swift — maragudk/fabrik