Mike Ash 12/15/2017

Friday Q&A 2017-12-08: Type Erasure in Swift

Read Original

This technical article delves into type erasure in Swift, explaining the concept, its motivation for hiding implementation details or enabling type interoperability, and practical implementation. It discusses limitations of Swift's generics and protocols with associated types, and how type-erased wrappers like AnySequence provide solutions, complete with code examples.

Friday Q&A 2017-12-08: Type Erasure in Swift

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week