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
64
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
160
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
280
Ruby 型別檢查工具簡介
johnlinvc
0
500
Swift Actor 實作探索
johnlinvc
0
160
用 mruby 來寫跨平台工具
johnlinvc
0
85
Actor model 簡介
johnlinvc
0
200
一起玩 Helm 3
johnlinvc
1
130
為什麼 App 卡卡的
johnlinvc
2
1.2k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
220
Other Decks in Programming
See All in Programming
CSC305 Lecture 09
javiergs
PRO
0
320
NIKKEI Tech Talk#38
cipepser
0
300
iOSでSVG画像を扱う
kishikawakatsumi
0
170
Claude CodeによるAI駆動開発の実践 〜そこから見えてきたこれからのプログラミング〜
iriikeita
0
360
What's new in Spring Modulith?
olivergierke
1
170
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
12
7.2k
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
320
Blazing Fast UI Development with Compose Hot Reload (Bangladesh KUG, October 2025)
zsmb
2
360
CSC305 Lecture 08
javiergs
PRO
0
280
社会人になっても趣味開発を続けたい! / traPavilion
mazrean
1
110
SODA - FACT BOOK(JP)
sodainc
1
8.9k
AkarengaLT vol.38
hashimoto_kei
1
130
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Mobile First: as difficult as doing things right
swwweet
225
10k
Being A Developer After 40
akosma
91
590k
Product Roadmaps are Hard
iamctodd
PRO
55
11k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
Documentation Writing (for coders)
carmenintech
75
5.1k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
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