Member-only story
My Top iOS News for Developers 2022. Part 2/2
Top 20 New Features in iOS 16, Swift 5.7, and Xcode 14
Last time we looked at some of my favorite novelties introduced for iOS and Swift developers this year. This time let’s conclude the list with the top-10 of them.
Here’s the first part in case you missed it:
#10. Regex
Popular programming languages like Python or JavaScript have had their means to deal with Regular Expressions for ages. Although the tool is as old as time, it’s still here, and Swift programmers had to deal with inherited NSRegularExpression
class. But starting from Swift 5.7, they finally have their own way to work with it. And what a way!
The new Regex
type has many means to declare a regular expression, and the most interesting one is probably its expression builder DSL, which doesn’t require deep knowledge of the RegEx syntax. Here’s an example of an expression and a captured value, retrieved from an input:
import RegexBuilder
let nameReference =…