TIL Apple’s Swift standard library, Google's, Official raywenderlich.com, Linkedin and Coursera Swift Style Guides; TIL API Design Guidelines from Swift.org
Yesterday I was asked at job interview which style guide I use for Swift. I don’t know which one. I don’t know even which exist. I definitely use some because I can’t refrain from fixing function call to trailing closure syntax or to add space before opening curly brace. The question is what’s the name of style guide I use. I started to google to name swift style guides available.
-
Google’s Swift Style guide which is based on Apple’s Swift standard library style. Now I know which style guide I use: Apple’s Swift standard library style. Or one required by default by swiftlint tool.
-
Coursera Swift coding guidelines. Wow, it’s so short!
And that’s it!
Swift.org has API Design Guidelines, which should be mentioned here.
A book Swift Style: An Opinionated Guide to an Opinionated Language by Erica Sadun should be mentioned. But because the book is of 2017 and style itself is not available without buying a copy of book, this doesn’t count.