Check out the first draft of the Ray Wenderlich team official Swift style guide – and submit your comments!
Here are some of the highlights of the guide:
- Avoid unnecessary code. In general, avoid using unnecessary (but optional) code in Swift. For example, don’t use self unless there’s a reason, avoid semicolons, prefer inferred typing.
- Closure syntax. Use trailing closure syntax wherever possible, and prefer to use the closure parameters descriptive names.
- Constants. Prefer to make your values constants with let – make variable with var only when necessary.
- The Smiley Face. There is only one true smiley face :]