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
Swift weekly 2018/01/02
Search
Johnlin
January 02, 2018
Programming
68
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Swift weekly 2018/01/02
Johnlin
January 02, 2018
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
300
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
390
Ruby 型別檢查工具簡介
johnlinvc
0
620
Swift Actor 實作探索
johnlinvc
0
200
用 mruby 來寫跨平台工具
johnlinvc
0
120
Actor model 簡介
johnlinvc
0
240
一起玩 Helm 3
johnlinvc
1
160
為什麼 App 卡卡的
johnlinvc
2
1.3k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
260
Other Decks in Programming
See All in Programming
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
330
AIエージェントで 変わるAndroid開発環境
takahirom
2
680
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
190
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
110
act1-costs.pdf
sumedhbala
0
230
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
390
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
860
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
500
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
230
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
170
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
110
Performance Engineering for Everyone
elenatanasoiu
0
270
Featured
See All Featured
The untapped power of vector embeddings
frankvandijk
2
1.8k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
970
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
420
Typedesign – Prime Four
hannesfritz
42
3.1k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
Design in an AI World
tapps
1
260
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Odyssey Design
rkendrick25
PRO
2
730
Agile that works and the tools we love
rasmusluckow
331
22k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
510
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
220
Transcript
Swift पใ 2018/01/02 John Lin @johnlinvc
From the core • Swift ஃ
Swift ஃ • https://forums.swift.org/ • ༬ܭ Ұ݄ॳ။ਖ਼ࣜ⬏༻
Evolution • [SE-0187] Ճೖ Sequence.filterMap(_:) Sequence.compactMap(_:)
[SE-0187] Ճೖ Sequence.compactMap(_:) • ݱࡏSwift ༗ࡾछ flatMap • ୈҰछੋ࠷ৗݟతɼᩋၷత Sequence
Ꮣ Ұ let fm1 = [[1,2], [2,3]].flatMap { return $0 } fm1 //[1,2,2,3] • ୈೋछੋሣ Optional ཫ໘తᆴ၏ࣄ let opt : Int? = 1 let fm2 = opt.flatMap {return $0 == nil ? nil : $0!+1} // 2 • ୈࡾछੋ༻ိ Seqence ཫ໘త nil ᖤᎃ let fm3 = [1,nil,2].flatMap{return $0} // [1,2]
[SE-0187] Ճೖ Sequence.compactMap(_:) • ୈࡾछతߦҝ໊ሣෆىိ let fm3 = [1,nil,2].flatMap{return $0}
// [1,2] • ॴҎཁվ Rust ؐ༗ Ocaml Ұᒬత໊ filterMap • ॴҎཁվ Ruby ൺֱ૾త໊ compactMap • ᢜత။ཹஶɼୠੋ။ Warning fix-it
Community • Chris Lattner త Python Interop ౼େፌ ֢Լྃ۟ ᴍɼܾఆॄኄෆվɻ
• https://lists.swift.org/pipermail/swift-evolution/Week- of-Mon-20171218/042262.html
Community • ᨲݴɿ iOS తఔࣜሡՄҎࡏ macOS ্䋯 • https://www.bloomberg.com/news/articles/ 2017-12-20/apple-is-said-to-have-plan-to-combine-
iphone-ipad-and-mac-apps