반응형
Design
-
[WWDC22] Design protocol interfaces in SwiftiOS 2022. 6. 16. 18:08
Design protocol interfaces in Swift - WWDC22 - Videos - Apple Developer Learn how you can use Swift 5.7 to design advanced abstractions using protocols. We'll show you how to use existential types, explore how... developer.apple.com Understand type erasure 연관 타입을 가진 프로토콜이 existential 타입과 어떻게 상호작용하는지 볼 것이다. Animal 프로토콜에 produce() 메서드를 추가해서 음식을 생산하는 것을 추상화했다. 다른 동물마다 달라지는 produce()의 리턴 타입을 추상화하는 가..