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
0
55
Swift weekly 2018/01/02
Johnlin
January 02, 2018
Tweet
Share
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
82
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
220
Ruby 型別檢查工具簡介
johnlinvc
0
420
Swift Actor 實作探索
johnlinvc
0
140
用 mruby 來寫跨平台工具
johnlinvc
0
66
Actor model 簡介
johnlinvc
0
170
一起玩 Helm 3
johnlinvc
1
110
為什麼 App 卡卡的
johnlinvc
2
1.1k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
180
Other Decks in Programming
See All in Programming
Djangoにおける複数ユーザー種別認証の設計アプローチ@DjangoCongress JP 2025
delhi09
PRO
4
510
Jakarta EE meets AI
ivargrimstad
0
700
DRFを少しずつ オニオンアーキテクチャに寄せていく DjangoCongress JP 2025
nealle
2
300
Introduction to C Extensions
sylph01
3
120
GoとPHPのインターフェイスの違い
shimabox
2
220
Better Code Design in PHP
afilina
0
180
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
260
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.6k
kintone開発を効率化するためにチームで試した施策とその結果を大放出!
oguemon
0
350
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
650
AIプログラミング雑キャッチアップ
yuheinakasaka
20
5.3k
未経験でSRE、はじめました! 組織を支える役割と軌跡
curekoshimizu
1
200
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Producing Creativity
orderedlist
PRO
344
40k
Building Adaptive Systems
keathley
40
2.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
13
1k
Done Done
chrislema
182
16k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
260
Being A Developer After 40
akosma
89
590k
KATA
mclloyd
29
14k
Visualization
eitanlees
146
15k
Navigating Team Friction
lara
183
15k
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