Swift Style Guides (a brief look)
5 (1)

Click to rate this post!
[Total: 1 Average: 5]

Last Updated on March 13, 2022 by Deya Eldeen

You most probably was working on an open source project, and must have noticed projects are usually organized and consistent ๐Ÿง, this is due to following a code style, and you must have noticed that some projects are messy, ugly and inconsistent ๐Ÿคฎ.

There are different Swift Code Styles, one by Apple, Google, Ray Wenderlich, Linkedin and AirBNB, and others, preferring a code style over another is subjective, I recommend inspecting different styles and adopt one according to the project needs.

Developers spend time reading code, more than writing new code ๐Ÿ˜Œ, this alone justifies having a consistent clean coding style, this is an investment you do for yourself as a developer, and for your colleagues ๐Ÿ˜‡, regular indentation, proper spelling, .. etc does not make your task take longer, in the contrary, it saves you big load of time in the future, and improves readability and maintainability.

There is an official API Design guidelines, it covers naming conventions, but is not comprehensive enough.

Another guideline can be found here, by Nikita Lazarev-Zubov, it looks like she has preservations on some guidelines too, I highly recommend going through these guidelines and inspecting yourself.


Leave a Reply

Your email address will not be published. Required fields are marked *