Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
67
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
230
The least you need to know about hashing in Swift
gregheo
0
160
Shared Mutable State
gregheo
0
510
Shared, Exclusive, Mutable, Immutable
gregheo
0
150
Getting Under Swift’s Skin
gregheo
0
540
Sanitizing Threads for Fun & Profit
gregheo
0
140
Sanitizing All* The Things
gregheo
0
63
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
410
Other Decks in Technology
See All in Technology
202512_AIoT.pdf
iotcomjpadmin
0
140
Authlete で実装する MCP OAuth 認可サーバー #CIMD の実装を添えて
watahani
0
180
マイクロサービスへの5年間 ぶっちゃけ何をしてどうなったか
joker1007
20
7.7k
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
500
「図面」から「法則」へ 〜メタ視点で読み解く現代のソフトウェアアーキテクチャ〜
scova0731
0
500
AWSインフルエンサーへの道 / load of AWS Influencer
whisaiyo
0
220
New Relic 1 年生の振り返りと Cloud Cost Intelligence について #NRUG
play_inc
0
230
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.9k
松尾研LLM講座2025 応用編Day3「軽量化」 講義資料
aratako
6
3.4k
Bedrock AgentCore Memoryの新機能 (Episode) を試してみた / try Bedrock AgentCore Memory Episodic functionarity
hoshi7_n
2
1.9k
意外と知らない状態遷移テストの世界
nihonbuson
PRO
1
250
なぜ あなたはそんなに re:Invent に行くのか?
miu_crescent
PRO
0
210
Featured
See All Featured
How to make the Groovebox
asonas
2
1.8k
4 Signs Your Business is Dying
shpigford
186
22k
Are puppies a ranking factor?
jonoalderson
0
2.4k
Documentation Writing (for coders)
carmenintech
77
5.2k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Embracing the Ebb and Flow
colly
88
4.9k
Mind Mapping
helmedeiros
PRO
0
39
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
286
14k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
510
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
How Software Deployment tools have changed in the past 20 years
geshan
0
30k
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
❓
%&