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
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
47
Other Decks in Programming
See All in Programming
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
2.8k
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
2
580
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
290
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
500
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
150
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
130
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
380
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.2k
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
120
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
160
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
4
1.4k
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
230
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
660
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Unsuck your backbone
ammeep
672
58k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
Accessibility Awareness
sabderemane
1
160
The Cost Of JavaScript in 2023
addyosmani
55
10k
Navigating Team Friction
lara
192
16k
We Are The Robots
honzajavorek
0
280
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.1k
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