Loops
A look at many different built-in ways to iterate over arrays, dictionaries, and other Swift collections.
Articles, podcasts and news about Swift development, by John Sundell.
A look at many different built-in ways to iterate over arrays, dictionaries, and other Swift collections.
What’s the difference between those two ways, and when should which be used?
Setting up two-way bindings between the elements in a collection and a series of SwiftUI views.
Nick Lockwood returns to the show to go on a deep dive into data structures and algorithms, what some of the pros and cons of writing high-performance code in Swift are, and how all of that relates to parallelization and performance.
This week, let’s explore how we can make use of the standard library’s built-in algorithms when performing various types of queries against collections of values.
Let’s take a look at how we can utilize Swift’s various collection slicing APIs, and how doing so can help us boost the performance of various algorithms and functionality.
Almost every Swift program uses collections in one way or another. Whether it's to store values to be displayed in some form of list, to keep track of observers, or caching data - collections are everywhere. This week, let's take a look at some of the standard library APIs that let us easily transform collections in a very functional way.
When creating collections of objects or values in Swift, we usually use data structures provided by the standard library - such as Array, Dictionary and Set. While those three cover most use cases, sometimes creating a custom wrapper collection can enable us to make our code more predictable and less prone to errors.