Software Dev

Using Type Erasure to Build a Dependency Injecting Routing Framework in Swift

This post is just as weird and abstract as it sounds. 🤯 On first pass, I don’t get it. But I’m saving it here because I always like anything that promises easier dependency injection.

We’ll take an exciting look at how the treatment of methods/closures as properties can be used in this context to bypass one of the Swift Compiler’s most annoying compilation errors.

👉 Using Type Erasure to Build a Dependency Injecting Routing Framework in Swift

Type Erasure is the process of abstracting constrained, generic types inside an unconstrained non-generic type that can be passed around freely

Via iOS Dev Weekly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.