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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
45
iOS Architecture & Pattern
jukiginanjar
0
46
Other Decks in Programming
See All in Programming
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
270
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
520
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
JOAI2026 1st solution - heron0519 -
heron0519
0
140
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
120
事業会社でのセキュリティ長期インターンについて
masachikaura
0
250
ハーネスエンジニアリングとは?
kinopeee
11
5.6k
おれのAgentic Coding 2026/03
tsukasagr
1
150
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
実用!Hono RPC2026
yodaka
2
230
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
5k
Vibe NLP for Applied NLP
inesmontani
PRO
0
440
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
250
Ruling the World: When Life Gets Gamed
codingconduct
0
210
Typedesign – Prime Four
hannesfritz
42
3k
Mobile First: as difficult as doing things right
swwweet
225
10k
Building AI with AI
inesmontani
PRO
1
910
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
270
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
340
The World Runs on Bad Software
bkeepers
PRO
72
12k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
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