Book Image

Mastering Swift

By : Jon Hoffman
Book Image

Mastering Swift

By: Jon Hoffman

Overview of this book

Table of Contents (22 chapters)
Mastering Swift
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

What is a programming style guide?


Coding styles are very personal and every developer has his or her own preferred style. These styles can vary from language to language, person to person, and also change over time. The personal nature of coding styles can make it difficult to have a consistent and readable code base when numerous individuals are contributing to the code.

While most developers might have their own preferred styles, the recommended or preferred style between languages can vary. As an example, in C#, when we name a method or function, it is preferred to use camel case with the first letter being capitalized. While in most languages, such as C, Objective-C, and Java, it is also recommended that we use camel case, but we should make the first letter lower case.

The best applications are coded properly and by properly we do not just mean that they function correctly but we also mean that they are easy to maintain and the code is easy to read. It is hard for large projects and...