Passing key paths as functions
A quick look at one of Swift 5.2’s small but really useful new features.
Articles, podcasts and news about Swift development, by John Sundell.
Frequently published articles about Swift techniques, language features, architectual patterns, and beyond.
Subscribe via RSS
A quick look at one of Swift 5.2’s small but really useful new features.
A look at some of the APIs that Swift’s built-in Result type ships with.
How to enable key paths to be used in switch statements, and within any other context that supports pattern matching.
Making single-expression functions and properties simpler in Swift 5.1.
Only enabling a collection to be publicly mutated in specific ways.
How to extract leading and trailing elements from any sequence.
Enabling overloaded functions to be passed as arguments.
The power of switch statements and pattern matching.
How I pick between a computed property and a method.
A really cool side-effect of operators being functions in Swift.
Assigning a custom CALayer to a UIKit view.