Passing key paths as functions
A quick look at one of Swift 5.2’s small but really useful new features.
Articles and podcasts about Swift development, by John Sundell.
Presented by the Genius Scan SDK
Browse the Swift by Sundell archive, containing all articles published throughout the years.
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.