Creating custom query functions using key paths
How key paths can be made much more powerful when used to query and filter collections.
Articles, podcasts and news about Swift development, by John Sundell.
How key paths can be made much more powerful when used to query and filter collections.
Vincent Pradeilles joins John to discuss various ways to use Swift language features like key paths and closures, how they relate to patterns typically used within functional programming, and when and how to adopt such patterns.
Let’s take a look at how Swift’s key paths work, and how they relate to functions — both in terms of what comes built into the language itself, and what kind of utilities that we can write ourselves to form some really nice convenience APIs.
Arguably one of the most challenging aspects of building apps for most platforms is making sure that the UI we present to the user always remains in sync with our underlying data models, and many techniques have been invented in order to address this problem. This week, let’s take a look at one such technique, that involves binding our model values to our UI.
Swift keeps gaining more and more features that are more dynamic in nature, while still retaining its focus on type safe code. This week, let’s take a look at how key paths in Swift work, and some of the cool and powerful things they can let us do.