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
74
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
260
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
170
Getting Under Swift’s Skin
gregheo
0
560
Sanitizing Threads for Fun & Profit
gregheo
0
180
Sanitizing All* The Things
gregheo
0
71
Thirteen Ways of Looking at a View Controller
gregheo
0
150
Five Unbelievable Secrets of Reactive Programming the Experts Don't Want You to Know!
gregheo
3
450
Other Decks in Technology
See All in Technology
Building Audio Plugin Ecosystem for Android in 2026
atsushieno
2
140
IBC 2026 動画技術関連レポート / IBC 2026 Report
cyberagentdevelopers
PRO
2
180
Oracle Database Security 詳細解説
oracle4engineer
PRO
1
250
推論基盤と Scale-Up Interconnect の現状と制約から俯瞰する技術動向
markunet
2
800
Autonomous AI Lakehouse - Live AI Hubから始めるセキュアなAIデータ活用 -
oracle4engineer
PRO
3
190
基本から分かる!AWSセキュリティ運用の考え方と任せ方
cmusudakeisuke
1
400
"AWSはちょっと苦手"でも大丈夫。AWS Blocks で手軽に作る Flutter のバックエンド #FlutterKaigi
tacck
PRO
0
140
kaonavi Tech Night#2
kaonavi
0
110
【dbts2026】AIエージェントの 判断と探索を変える、 データベース エンジニアリング― 既存DBの処理と依存関係から作る、オペレーショナルオントロジー ―
shisyu_gaku
0
100
複雑な業務システムを高速でつくるため、チーム全員をつくれる人へ
ayakurabuchi
0
130
Software Engineering in an AI-Driven World
erikjhordan_rey
0
110
AI Agent 時代のデータ基盤: ClickHouse で実現する 超高速分析とコスト削減の両立
jozono
0
140
Featured
See All Featured
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Raft: Consensus for Rubyists
vanstee
143
7.8k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
520
The Invisible Side of Design
smashingmag
301
52k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
A Soul's Torment
seathinner
8
3.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
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
❓
%&