Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Thinking in Swift!
Search
Ritesh Gupta
January 21, 2017
Technology
3
310
Thinking in Swift!
Swift India, Delhi Meetup
Ritesh Gupta
January 21, 2017
Tweet
Share
More Decks by Ritesh Gupta
See All by Ritesh Gupta
Declarative Networking with Combine –– iOS Conf SG 2020
riteshhh
0
140
Combine! All the things
riteshhh
3
660
Deep dive into Protocols
riteshhh
1
270
How to be a POP-Star
riteshhh
1
240
Other Decks in Technology
See All in Technology
データ品質をコード化! LINEヤフーのMLOpsを最適化する "ACP Data Quality" の紹介
lycorptech_jp
PRO
2
170
現実世界の事象から学ぶSOLID原則
h0r15h0
24
10k
8週連続ウェビナー_イチから学ぶFivetran
cmsuzu
0
170
実務への応用例から考える 変更に強いオブジェクト指向設計 / 20240324-ooc2024
bengo4com
7
5.3k
Cloud Deploy と仲良くなりたい
phaya72
1
100
KubeCon EU: Unlocking new Platform Experiences with Open Interfaces
salaboy
1
370
生成AI・LLM時代における 機械学習エンジニアとしてのキャリア戦略・開発戦略 / my-career-and-development-strategies-for-ml-engineer-2024
yuya4
4
300
継続的テストモデルを実現するためにスリーアミーゴスを用いた10Xでのシフトレフトの事例
nihonbuson
3
160
オブジェクト指向宗教史
tanakahisateru
13
12k
KubeCon EU 2024 : Knative Maintainers Session
salaboy
0
370
中央集権体制からDataOpsへの転換 / centralized-to-dataops-transformation
pei0804
7
1.5k
データマネジメントを支える武器としてのメタデータ管理
10xinc
1
440
Featured
See All Featured
Teambox: Starting and Learning
jrom
126
8.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
39
4.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
1.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
950
Fontdeck: Realign not Redesign
paulrobertlloyd
75
4.8k
RailsConf 2023
tenderlove
0
510
Designing with Data
zakiwarfel
94
4.8k
YesSQL, Process and Tooling at Scale
rocio
160
13k
Stop Working from a Prison Cell
hatefulcrawdad
265
19k
Facilitating Awesome Meetings
lara
39
5.5k
Unsuck your backbone
ammeep
661
56k
Building Adaptive Systems
keathley
29
1.8k
Transcript
in Swift ~ Ritesh Gupta (Swift India, Delhi Meetup)
Swift is just not a syntax migration from Objective-C…
Swift is not objective-c styled language…
C ~> C++ Objective-C ~> Swift { imperative } {
object oriented } { object oriented } { protocol oriented }
None
None
None
None
stuck with Inheritance..
None
None
compose everything with Protocols..
UIButton UIBarButtonItem
UIButton UIControl UIView
UIBarButtonItem UIBarItem NSObject
UIBarButtonItem UIBarItem NSObject UIButton UIControl UIView
None
None
Entity (class, struct) vs Behaviour (protocol)
UIView Framable
UIImageView ImageRenderable, Framable
UIButton Tappable, ImageRenderable, Framable
UITableViewCell UICollectionViewCell Reusable, Framable
UIScrollView Scrollable, Framable
UITableView UICollectionView Listable, Scrollable, Framable
UI Entities is collection of behaviours…
..computed variables, extensions, values types, immutability, functional programming, generics, enums,
associative types/ values..
thinking in protocol..
None