iOS 10: Swift 3 API Design Guidelines | Ray Wenderlich

OK - your Swift code works, but it's still wrong! Discover how to create Swifty APIs and learn from the best in the form of Cocoa and CocoaTouch.

This is a companion discussion topic for the original entry at

@samdavies where can we see the other naming conventions of Swift APIs, is there a list created by Apple? Thanks.

Also, where do you use mutating functions?

Hi @rubiriffic

Swift has a set of API design guidelines available here: has also created our own Swift style guide, which leans heavily on the Swift guidelines (it actually predates it) and focuses on code that works well for teaching. You might like to look at that too:

Mutating functions are those on a struct that actually changes the underlying data. There is some information around mutating functions in the Swift docs:

When you have something that is conceptually a value type, and want to change it, it can be perfectly acceptable to mutate it.

Hope that helps,