Generic
2022 WWDC Design protocol interfaces in Swift
Understand type eraure: associated type이 있는 protocol이 existential any type과 어떻게 상호 작용하는지 설명. Hide implementation details: interface와 implementation을 분리해서 캡슐화하기 위해 opaque type을 사용하는 방법에 대해 설명. Identify type releationships: protocol에서 same-type requirements가 concrete type의 여러가지 다른 sets간의 관계를 모델링하는 방법에 대해 설명. Understand type eraure protocol Animal { associatedtype CommodityType: Food func produce()..