Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Promises, Futures, and the Shape of Your Code
Search
Greg Heo
May 21, 2018
Technology
72
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Promises, Futures, and the Shape of Your Code
Greg Heo
May 21, 2018
More Decks by Greg Heo
See All by Greg Heo
Concurrency From the Ground Up
gregheo
0
250
The least you need to know about hashing in Swift
gregheo
0
220
Shared Mutable State
gregheo
0
560
Shared, Exclusive, Mutable, Immutable
gregheo
0
160
Getting Under Swift’s Skin
gregheo
0
560
Sanitizing Threads for Fun & Profit
gregheo
0
170
Sanitizing All* The Things
gregheo
0
69
Thirteen Ways of Looking at a View Controller
gregheo
0
140
Five Unbelievable Secrets of Reactive Programming the Experts Don't Want You to Know!
gregheo
3
440
Other Decks in Technology
See All in Technology
OpenSharing について熱く語る〜AI アセットの共有について〜
kameitomohiro
0
130
自主式軟體工廠
philipz
0
120
Account Factory for Terraformによる 標準化されたアカウント発行の自動化
pensuke628
0
120
TiDBファミリーにDWHが新登場!! TiDB最新情報 / TiDB update 202609
yoshiakiyamasaki
0
190
Claude起点の仕様駆動開発
tanakaseiya
0
300
Snowflake Horizon Catalog と Apache Iceberg で作る オープンなデータ基盤
kitagawaz
0
390
Incremental HTTP
kazuho
5
2k
VS Code × GitHub Copilot での Fabric 開発
ryomaru0825
1
220
ログラスのマルチプロダクトを 支える認証基盤 〜テナントごとに異なる統制とどう向き合うか〜
dada4386
3
330
AgentCoreで実践するハーネスエンジニアリング
yakumo
1
240
個別開発で終わらせない。 現場の課題をプロダクトの強さに変える StockmarkのFDE
ktkrhr
0
550
【Findyテック文化祭ワークショップ】新卒エンジニア&採用担当と作る、 なりたい姿と今やるべき一歩
dip_tech
PRO
0
150
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1369
210k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
780
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
A Tale of Four Properties
chriscoyier
163
24k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
250
Building AI with AI
inesmontani
PRO
1
1.3k
Amusing Abliteration
ianozsvald
1
320
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
510
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Everyday Curiosity
cassininazir
0
340
Transcript
@gregheo C1 Mobile Summit
++++++++[>++++[>++>+ ++>+++>+<<<<-]>+>+>- >>+[<]<-]>>.>---.+++ ++++..+++.>>.<-.<.++ +.------.--------.>> +.>++.
None
None
None
None
None
!
networker.beginRequest(.read, success: { data in })
networker.beginRequest(.read, success: { data in parser.parseRaw(data) { result in }
})
networker.beginRequest(.read, success: { data in parser.parseRaw(data) { result in archiver.materialize(from:
result) { objects in } } })
networker.beginRequest(.read, success: { data in parser.parseRaw(data) { result in archiver.materialize(from:
result) { objects in dataStore.save(objects) { status in } } } })
networker.beginRequest(.read, success: { data in parser.parseRaw(data) { result in archiver.materialize(from:
result) { objects in dataStore.save(objects) { status in print("Save success!") } } } }) print("Hello 1") print("Hello 2")
⏰#
None
A B C X Y Z
networker.beginRequest(.read, success: { data in parser.parseRaw(data) { result in archiver.materialize(from:
result) { objects in dataStore.save(objects) { status in print("Save success!") } } } }) print("Hello 1") print("Hello 2")
⏰#
networker.beginRequest(.read, success: { data in parser.parseRaw(data) { result in archiver.materialize(from:
result) { objects in dataStore.save(objects) { status in print("Save success!") } } } })
Clojure
Future
(defn square [x] (* x x) )
(defn square [x] (future (* x x)) )
(defn saveToDisk [data] (future ( ... )) )
saveToDisk future completed? cancelled? value
@myFuture (deref myFuture)
A X Y future B C D (deref future)
Future
Promise
@myPromise (deref myPromise)
getValue promise realized? value promise deliver
Promise
❓
%&