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
58
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
120
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
250
Ruby 型別檢查工具簡介
johnlinvc
0
460
Swift Actor 實作探索
johnlinvc
0
160
用 mruby 來寫跨平台工具
johnlinvc
0
71
Actor model 簡介
johnlinvc
0
190
一起玩 Helm 3
johnlinvc
1
110
為什麼 App 卡卡的
johnlinvc
2
1.2k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
200
Other Decks in Programming
See All in Programming
Development of an App for Intuitive AI Learning - Blockly Summit 2025
teba_eleven
0
110
エラーって何種類あるの?
kajitack
5
140
Claude Codeの使い方
ttnyt8701
1
110
単体テストの始め方/作り方
toms74209200
0
440
FormFlow - Build Stunning Multistep Forms
yceruto
1
170
TypeScript LSP の今までとこれから
quramy
1
500
業務自動化をJavaとSeleniumとAWS Lambdaで実現した方法
greenflagproject
1
110
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
10
1.8k
Benchmark
sysong
0
180
つよそうにふるまい、つよい成果を出すのなら、つよいのかもしれない
irof
1
290
関数型まつりレポート for JuliaTokai #22
antimon2
0
100
CSC307 Lecture 17
javiergs
PRO
0
110
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
For a Future-Friendly Web
brad_frost
179
9.8k
The Language of Interfaces
destraynor
158
25k
Building an army of robots
kneath
306
45k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
Code Reviewing Like a Champion
maltzj
524
40k
RailsConf 2023
tenderlove
30
1.1k
Designing for humans not robots
tammielis
253
25k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
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