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
41
iOS Architecture & Pattern
jukiginanjar
0
45
Other Decks in Programming
See All in Programming
Vibe codingでおすすめの言語と開発手法
uyuki234
0
160
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
200
Grafana:建立系統全知視角的捷徑
blueswen
0
270
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
3
770
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
330
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2k
Deno Tunnel を使ってみた話
kamekyame
0
300
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
500
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
180
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
210
Implementation Patterns
denyspoltorak
0
140
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
430
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
120
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
42
Agile that works and the tools we love
rasmusluckow
331
21k
Why Our Code Smells
bkeepers
PRO
340
58k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
98
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
0
990
From π to Pie charts
rasagy
0
100
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
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