Chapter 3Establish Preferred Practices
As with any programming language, Swift offers many ways to achieve goals. Some coding practices are better than others. Good guidance emphasizes robust and reliable code. Develop your coding guidelines to select from the merits of competing approaches. Strong recommendations ensure that members of your team always prefer the house approach. Considered rules produce consistent code; that consistency extends throughout large projects. They also ensure lower maintenance costs and reduce the time it takes any team member to get up to speed.
When there’s a preferred approach, you eliminate debates. You don’t argue on whether you should always, for example, include a reference to self or allow stand-alone functions. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access