Type Erasure in Swift

Photo by Mark Harpur on Unsplash

Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 11.4.1, and Swift 5.2.2

This article is example laden, and shows how I’ve used Type Erasure in my production Apps. It should help if you wish to know what Type Erasure is and how you might apply it in your Swift code.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store