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
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
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
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
130
Getting Started with Google Antigravity
glaforge
0
220
Snapshot Testing in Practice: Predictable and Reliable SwiftUI Views
fespinoza
0
200
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
7
2.9k
WasmをRustにする
sansantech
PRO
0
200
宣言型部分更新は何を解決しどこへ向かうのか
shuta13
1
320
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.7k
自主式軟體工廠
philipz
0
260
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
0
450
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
860
会社説明資料
persolserverworks
0
9.7k
AI時代のPRレビューにどう向き合うか?
kairim0
1
210
Featured
See All Featured
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Test your architecture with Archunit
thirion
2
2.4k
Designing Powerful Visuals for Engaging Learning
tmiket
1
600
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Product Roadmaps are Hard
iamctodd
55
13k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
YesSQL, Process and Tooling at Scale
rocio
174
15k
A Tale of Four Properties
chriscoyier
163
24k
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
❓
%&