Categories
Featured iPhone Development Resources Swift

A Tutorial Using Examples Showing How Guard Statements Can Make Code More Readable And Concise

Late last year I mentioned a nice introductory guide to using the guard and defer statements added within Swift 2.0.

Here’s a nice guide from Benedikt Terhechte that goes a little bit more in-depth providing a number of tips on using guard statements to make your code more readable and concise.

In the tutorial Benedikt goes through a number of code samples, and shows how they can be further simplified using guard statements.

You can find the tutorial on the Appventure blog.

A nice guide on using guard statements in Swift.