Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
Tags
- swift associated type
- BFS
- SWIFT
- custombottomsheet
- swift dashed line
- task cancel
- 버튼 피드백
- swift bottomsheet
- RxSwift
- 드롭다운 버튼
- custom navigation bar
- swift existential type
- swift 백준
- reactorkit
- scene delegate
- Tuist
- swift navigationcontroller
- task cancellation
- swift opaque type
- UIKit
- uikit toast
- OAtuh 2.0
- identifiable
- button configuration
- DP
- coordinator
- custom ui
- swift 점선
- swift custom ui
- swift concurrency
Archives
- Today
- Total
목록swift existential type (1)
김경록의 앱 개발 여정
[Swift] 타입 추상화(associated, Opaque, Existential, Generic)
Swift는 타입 안정성이 아주 강력한 언어입니다.특히 타입 추상화(type abstraction)와 관련된 기능들이 다양해서,제대로 활용하면 코드의 유연성과 재사용성이 크게 높아지죠.오늘은 그중에서도 뭔가 비슷한 것 같으면서도 분명히 다른 네 가지 기능을 정리해보려고 합니다:연관 타입 (associatedtype)제네릭 (Generic)불명확 타입 (Opaque Type)실존 타입 (Existential Type)어디에 어떻게 써야 할지, 어떤 차이가 있는지 살펴보고 그래서 '이게 왜 존재해야하는가'에 대해 개인적인 생각을 담아봤습니다.💡 한글 용어는 야곰님의 『스위프트 프로그래밍 4판』을 기준으로 사용했습니다.1. 🧩 연관 타입 (associatedtype) — 프로토콜 내부에서의 타입 추상화📌..
TIL
2025. 7. 16. 21:14