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
Promises, Futures, and the Shape of Your Code
Search
Greg Heo
May 21, 2018
Technology
0
64
Promises, Futures, and the Shape of Your Code
Greg Heo
May 21, 2018
Tweet
Share
More Decks by Greg Heo
See All by Greg Heo
Concurrency From the Ground Up
gregheo
0
220
The least you need to know about hashing in Swift
gregheo
0
150
Shared Mutable State
gregheo
0
490
Shared, Exclusive, Mutable, Immutable
gregheo
0
140
Getting Under Swift’s Skin
gregheo
0
530
Sanitizing Threads for Fun & Profit
gregheo
0
130
Sanitizing All* The Things
gregheo
0
60
Thirteen Ways of Looking at a View Controller
gregheo
0
130
Five Unbelievable Secrets of Reactive Programming the Experts Don't Want You to Know!
gregheo
3
400
Other Decks in Technology
See All in Technology
DataOpsNight#8_Terragruntを用いたスケーラブルなSnowflakeインフラ管理
roki18d
1
340
OpenAI gpt-oss ファインチューニング入門
kmotohas
2
960
Optuna DashboardにおけるPLaMo2連携機能の紹介 / PFN LLM セミナー
pfn
PRO
1
880
Flaky Testへの現実解をGoのプロポーザルから考える | Go Conference 2025
upamune
1
420
Pure Goで体験するWasmの未来
askua
1
180
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
5.4k
From Prompt to Product @ How to Web 2025, Bucharest, Romania
janwerner
0
120
Why React!?? Next.jsそしてReactを改めてイチから選ぶ
ypresto
10
4.5k
自作LLM Native GORM Pluginで実現する AI Agentバックテスト基盤構築
po3rin
2
250
空間を設計する力を考える / 20251004 Naoki Takahashi
shift_evolve
PRO
3
330
Oracle Cloud Infrastructure:2025年9月度サービス・アップデート
oracle4engineer
PRO
0
400
業務自動化プラットフォーム Google Agentspace に入門してみる #devio2025
maroon1st
0
190
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
2.8k
Code Reviewing Like a Champion
maltzj
525
40k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Fireside Chat
paigeccino
40
3.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
A better future with KSS
kneath
239
17k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.7k
Git: the NoSQL Database
bkeepers
PRO
431
66k
We Have a Design System, Now What?
morganepeng
53
7.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Documentation Writing (for coders)
carmenintech
75
5k
A Tale of Four Properties
chriscoyier
160
23k
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
❓
%&