Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Swift - Protocol oriented programming
Search
Nanang Rafsanjani
September 25, 2015
Programming
770
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Swift - Protocol oriented programming
Perkenalan Swift - Protocol oriented programming
Nanang Rafsanjani
September 25, 2015
More Decks by Nanang Rafsanjani
See All by Nanang Rafsanjani
Introduction to Realm
jukiginanjar
0
50
iOS Architecture & Pattern
jukiginanjar
0
48
Other Decks in Programming
See All in Programming
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.7k
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
110
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
160
Intent as Code
shoppingjaws
6
810
「AI時代、配布するPythonコードをどう守るか: 難読化の実験と判断軸」 #PyconJP2026
pkshadeck
PRO
2
190
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
150
スマート反転とウェブアクセシビリティ
camiha
0
180
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
520
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
570
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
Security issues being discussed on Web Platforms
petamoriken
0
630
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.9k
A Modern Web Designer's Workflow
chriscoyier
699
190k
Six Lessons from altMBA
skipperchong
29
4.5k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
520
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
410
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
250
Rails Girls Zürich Keynote
gr2m
96
14k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Speed Design
sergeychernyshev
33
2.1k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
980
Transcript
Protocol Oriented Programming in Swift
"Crusty" is an old-school programmer who doesn't trust IDE's, debuggers
and he doesn’t do OOP
Classes are Awesome • Encapsulation • Access Control • Abstraction
• Namespace • Expressive Syntax • Extensibility
Classes are Awesome • Encapsulation • Access Control • Abstraction
• Namespace • Expressive Syntax • Extensibility You can do all that with structs and enums!
Classes are Awesome Inheritance
Classes are Awesome Inheritance
Classes are Awesome Inheritance
Crusty's 3 complaints about classes 1. Implicit sharing 2. Inheritance
is too intrusive 3. Lost type relationships
Implicit Sharing
Implicit Sharing
Implicit Sharing
Inheritance too intrusive • You can only have 1 super
class • Bloating your super class • If superclass have stored properties ◦ You have to accept them, which bloat it ◦ You have to initialize it ◦ Make sure that you understand how to interact with your superclass
Lost Type Relationships
Protocol Solves the Problems