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
54
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
49
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
200
Ruby 型別檢查工具簡介
johnlinvc
0
400
Swift Actor 實作探索
johnlinvc
0
130
用 mruby 來寫跨平台工具
johnlinvc
0
56
Actor model 簡介
johnlinvc
0
160
一起玩 Helm 3
johnlinvc
1
100
為什麼 App 卡卡的
johnlinvc
2
1.1k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
160
Other Decks in Programming
See All in Programming
Jakarta EE meets AI
ivargrimstad
0
150
CSC509 Lecture 09
javiergs
PRO
0
140
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
900
みんなでプロポーザルを書いてみた
yuriko1211
0
260
Quine, Polyglot, 良いコード
qnighy
4
640
Better Code Design in PHP
afilina
PRO
0
120
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
EventSourcingの理想と現実
wenas
6
2.3k
Amazon Qを使ってIaCを触ろう!
maruto
0
400
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
役立つログに取り組もう
irof
28
9.6k
Featured
See All Featured
The Invisible Side of Design
smashingmag
298
50k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
The Pragmatic Product Professional
lauravandoore
31
6.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Agile that works and the tools we love
rasmusluckow
327
21k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
GraphQLとの向き合い方2022年版
quramy
43
13k
GitHub's CSS Performance
jonrohan
1030
460k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Making Projects Easy
brettharned
115
5.9k
We Have a Design System, Now What?
morganepeng
50
7.2k
Docker and Python
trallard
40
3.1k
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