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
Swift - Protocol oriented programming
Search
Nanang Rafsanjani
September 25, 2015
Programming
760
0
Share
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
49
iOS Architecture & Pattern
jukiginanjar
0
47
Other Decks in Programming
See All in Programming
Modding RubyKaigi for Myself
yui_knk
0
860
JavaDoc 再入門
nagise
0
240
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
410
今さら聞けないCancellationToken
htkym
0
210
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
190
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
3
260
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
150
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
230
関係性から理解する"同一性"の型用語たち
pvcresin
2
630
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
230
3Dシーンの圧縮
fadis
1
570
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
580
Featured
See All Featured
New Earth Scene 8
popppiees
3
2.3k
エンジニアに許された特別な時間の終わり
watany
107
240k
Producing Creativity
orderedlist
PRO
348
40k
Deep Space Network (abreviated)
tonyrice
0
160
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
310
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
440
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Raft: Consensus for Rubyists
vanstee
141
7.5k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
760
Everyday Curiosity
cassininazir
0
220
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
380
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