Combining opaque return types with primary associated types
Explores using Swift 5.7's opaque return types (`some`) with primary associated types to simplify generic protocol returns, reducing the need for manual type erasure.
Explores using Swift 5.7's opaque return types (`some`) with primary associated types to simplify generic protocol returns, reducing the need for manual type erasure.
A beginner's guide to modern generic programming in Swift, covering protocols, associated types, existentials, and opaque types.
Explains how to use protocol-oriented design to effectively work with associated types and Self requirements in Swift, avoiding common pitfalls.
Explains type erasure in Swift, covering its purpose, use cases like AnySequence, and how to implement it to hide concrete types.