top of page

68. Article: What's the "any" keyword? Understanding Type Erasure in Swift

Writer: Hui WangHui Wang

Swift's strong typing is the cornerstone of program robustness. But in the past, in some special scenarios, strong typing brought some unnecessary code workload to developers.


Fortunately, the "any" keyword introduced in Swift 5.7 solves this problem nicely.


The article I recommend today explains the concept of Type Erasure and how has it been done in the past and what's the difference between having "any" and not.


References:


What's the any keyword? Understanding Type Erasure in Swift:


Existential any in Swift explained with code examples:


 

Follow me on:

コメント


Never Miss a Post. Subscribe Now!

I am an iOS developer, and I will share some knowledge related to iOS development from time to time.

Thanks for submitting!

© 2022 by (Foks) Hui Wang

bottom of page