Nil Coalescing Newsletter - February 2026
Hi there,
February is the shortest month of the year, yet for our team at Nil Coalescing, it was an incredibly packed one. We spent most of it on the move!
I recently had the opportunity to speak at the ARCtic Conference in Finland. It was quite the journey traveling from our home in the South Island of New Zealand all the way to Lapland. We essentially spent one week traveling and one week on the ground. It was absolutely worth it, though. I have never seen so much snow or such a beautifully frozen world, it felt like a fairy tale. The conference itself was also fantastic, and I'm really glad I had the opportunity to be part of it. I've shared some highlights from my talk "Swift's Hidden Gems" further down.
Natalia Panferova and Matthaus Woolard in Iso-Syöte
Shortly after returning home, I also had the chance to give a talk in Auckland at a local CocoaHeads meetup. It was more travel, but at least it was domestic this time! Since we don't currently have an active iOS developer conference in New Zealand, these meetups are such a vital part of our local community.
I won't be traveling again until try! Swift Tokyo which is in April. My main focus for March is finishing my next SwiftUI book, stay tuned for updates on that!
A glimpse into "Swift's Hidden Gems"
My talk at the ARCtic Conference focused on lesser-known Swift language features and techniques that can be applied to any Swift project, independent of the platform. One of the most surprising discoveries for the audience was how we can unwrap optionals in switch statements and for loops.
In situations where we have multiple optionals and need to perform an action based on their values, we can use a switch statement to process each permutation of presence or absence explicitly. The great thing about switching on a tuple of optional values is that the compiler will enforce that we process each possible combination, which is much safer than using multiple if-else statements.
let puppyAgeInMonths: Int? = 5
let puppyWeightInKg: Int? = nil
switch (puppyAgeInMonths, puppyWeightInKg) {
case let (age?, weight?):
print("Puppy age is \(age) months, weight is \(weight) kg")
case let (age?, nil):
print("Puppy age is \(age) months, weight is missing")
case let (nil, weight?):
print("Puppy weight is \(weight) kg, age is missing")
case (nil, nil):
print("Puppy age and weight are missing")
}
The surprising pattern here for the audience was the use of the question mark. In this context, it matches the optional only if it contains a value and unwraps it at the same time, so that we can use the unwrapped value directly in the case.
The ability to unwrap multiple optionals simultaneously within a switch statement using tuple pattern matching with the ? syntax has been available since Swift 1.0. This syntax is part of Swift's powerful pattern matching capabilities, which allow cases to match against various patterns, including tuples.
The ? pattern is essentially syntactic sugar for the underlying Optional enum's .some case, meaning case let value? is equivalent to the more verbose case .some(let value).
We can even use the same case let value? pattern in for loops to iterate over an array of optionals and perform an action only on non-nil elements. Since this syntax unwraps the optional, we can perform additional checks using a where clause. This wouldn't be possible, if the variable remained an optional within the loop.
let puppyNames: [String?] = [
"Max", "Bella", "Charlie", nil, "Lucy", "Luna", nil
]
for case let name? in puppyNames where name.hasPrefix("L") {
print("One of the puppies is named \(name)")
}
The syntax case let value? became available in for loops in Swift 2.0 back in 2015. This feature is part of the general pattern-matching capabilities introduced and expanded in Swift's early years, allowing for much cleaner iteration over collections of optionals without the need for manual unwrapping inside the loop body.
Blog updates
With all the travel this month, I only had time to write one blog post, but it's a practical one about SwiftUI animations.
If you've ever struggled with accidental animations in your projects, where views animate in ways you didn't intend, you'll find the animation(_:body:) API incredibly useful. Introduced in iOS 17, it allows us to precisely scope animations to specific attributes, ensuring that only the changes we want to animate are affected.
Check out the post for more details and code examples: Isolate SwiftUI animations to specific attributes
Thank you for following along. Next month, I'll be staying closer to home to focus on the final chapters of my upcoming SwiftUI book. This new book is designed as a sequel to SwiftUI Fundamentals meant for those who have already mastered the framework's inner workings and are ready for more advanced implementation techniques. I look forward to sharing more progress on that with you soon!
Discounts
Every month, I share exclusive, limited-time offers on my books with email newsletter subscribers. Sign up so you don’t miss future newsletter issues and can take advantage of upcoming discounts!

