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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Greg Heo
May 21, 2018
Technology
70
0
Share
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
240
The least you need to know about hashing in Swift
gregheo
0
190
Shared Mutable State
gregheo
0
530
Shared, Exclusive, Mutable, Immutable
gregheo
0
160
Getting Under Swift’s Skin
gregheo
0
550
Sanitizing Threads for Fun & Profit
gregheo
0
160
Sanitizing All* The Things
gregheo
0
67
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
420
Other Decks in Technology
See All in Technology
最新技術を"今は選ばない"という技術選定
leveragestech
PRO
0
410
基礎から解説!Icebergで紐解くSnowflake×Databricks連携の現在地
cm_yasuhara
0
310
CARTA HOLDINGS エンジニア向け 採用ピッチ資料 / CARTA-GUIDE-for-Engineers
carta_engineering
0
47k
AIコーディングエージェントの活用で、コードは静かに肥大化した
yosukeshinoda
1
360
データ分析基盤の信頼を支える視点と設計
yuki_saito
1
660
AI駆動開発でなんでもハンズオン環境をつくってみた
yoshimi0227
0
130
【禁断】Obsidianの第二の脳に「知の巨人」と呼ばれた師匠の脳をロードしてみた
nagatsu
0
6.5k
20260528_生成AIを専属DSに_Howの次にすべきことを考える
doradora09
PRO
0
200
Agentic Design Patterns
glaforge
0
190
自称宇宙最速で不合格となったAIP-C01にリベンジを果たすべくAIで問題集アプリを作ってみた。
yama3133
0
140
組織の中で自分を経営する技術
shoota
0
150
layerx-fde-practices
cipepser
6
2.7k
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
190
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
GraphQLとの向き合い方2022年版
quramy
50
15k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Everyday Curiosity
cassininazir
0
210
Practical Orchestrator
shlominoach
191
11k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
200
Optimizing for Happiness
mojombo
378
71k
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
❓
%&