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
0
750
Swift - Protocol oriented programming
Perkenalan Swift - Protocol oriented programming
Nanang Rafsanjani
September 25, 2015
Tweet
Share
More Decks by Nanang Rafsanjani
See All by Nanang Rafsanjani
Introduction to Realm
jukiginanjar
0
42
iOS Architecture & Pattern
jukiginanjar
0
45
Other Decks in Programming
See All in Programming
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
260
AI & Enginnering
codelynx
0
110
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
670
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
940
AI時代の認知負荷との向き合い方
optfit
0
150
今から始めるClaude Code超入門
448jp
8
8.6k
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
160
SourceGeneratorのススメ
htkym
0
190
CSC307 Lecture 08
javiergs
PRO
0
670
AtCoder Conference 2025
shindannin
0
1k
Basic Architectures
denyspoltorak
0
660
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
Featured
See All Featured
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Color Theory Basics | Prateek | Gurzu
gurzu
0
190
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Building the Perfect Custom Keyboard
takai
2
680
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
160
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Test your architecture with Archunit
thirion
1
2.1k
30 Presentation Tips
portentint
PRO
1
210
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
How to Ace a Technical Interview
jacobian
281
24k
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