Phantom Types in Swift
Phantom types let you tuck extra meaning into Swift’s type system without changing anything at runtime. A phantom type is a generic...
A personal blog by Deya Elkhawaldeh
Insights, ideas, and practical guides on
Swift, iOS development, and the Apple ecosystem.
Featured article
LLDB is more than a place to set breakpoints. You can inspect app state, test quick fixes without rebuilding, and automate common debug steps. This guide keeps things practical and beginner-friendly.
Phantom types let you tuck extra meaning into Swift’s type system without changing anything at runtime. A phantom type is a generic...
Getting a new Mac is always exciting, but the first few hours are usually spent setting things up just the way you...
Clean code is code that the next person, often you in six months, can read, trust, and change without fear. Most clean...
Every Swift feature you use, from async/await to if expressions to macros, went through a public process before it shipped. That process...
Swift Package Manager (SwiftPM) is the official tool for building, sharing, and depending on Swift code. It’s part of the Swift toolchain...
Before async/await, Apple platforms offered two main ways to run work concurrently: Grand Central Dispatch for lightweight blocks, and Operation with OperationQueue...
For years, asynchronous Swift meant completion handlers, nested closures, and manual hops between dispatch queues, with data races found only by luck...
Swift macros, introduced in Swift 5.9, generate code at compile time. Write @Observable on a class, #Preview in a SwiftUI file, or...