Type erasure in Swift

What is type erasure?

Type erasure is a powerful technique used in modern programming languages to abstract away the specific types of objects and to provide a more generic interface for working with related types. It allows programmers to write code that can be reused across multiple types, without the need to define separate implementations for each type.

This technique is commonly used in languages such as Swift and Kotlin, but the concept is applicable to many other programming languages as well. In this article, we’ll explore what type erasure is…

--

--

Jesús Alfredo Hernández Alarcón

Software Engineer with experience in mobile development using mainly agile methodologies. Experience with all Apple ecosystem.