The Swift Programming language has a number of powerful features that are sometimes overlooked by those new to the language. In this article, we’re going to look at one such feature – pattern matching – which offers huge potential for both simplifying your code and making it much more expressive.
The Switch Statement in Swift
In previous posts we’ve talked about many of Swift’s control flow statements. In this article, we’re going to complete our set by looking at the one control flow statement that we haven’t touched on yet – Swift’s switch statement.