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/09/04
Search
Johnlin
September 04, 2018
Programming
0
64
Swift weekly 2018/09/04
Johnlin
September 04, 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
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
みんなでプロポーザルを書いてみた
yuriko1211
0
260
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
150
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
as(型アサーション)を書く前にできること
marokanatani
9
2.6k
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
C++でシェーダを書く
fadis
6
4.1k
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1k
Arm移行タイムアタック
qnighy
0
310
役立つログに取り組もう
irof
28
9.6k
Remix on Hono on Cloudflare Workers
yusukebe
1
280
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Become a Pro
speakerdeck
PRO
25
5k
Optimizing for Happiness
mojombo
376
70k
It's Worth the Effort
3n
183
27k
What's in a price? How to price your products and services
michaelherold
243
12k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Happy Clients
brianwarren
98
6.7k
KATA
mclloyd
29
14k
Transcript
Swift पใ 2018/09/04 John Lin @johnlinvc
From the core • Swift 5: Start your engines
Swift 5: Start your engines • Release date: Late 2018
• ඪ: ABI stability (again) ɼแؚ generic, API resilience, memory ownership model • ။Լ૬༰ 4
Evolution • [SE-0220] count(where:) • [SE-0224] Support 'less than' operator
in compilation conditions • [SE-0225] isEven, isOdd, isMultiple • [SE-0226] Package Manager Target Based Dependency Resolution
[SE-0220] count(where:) • ཁዎᒬᏐ [1,2,3,4,5,6,7] ཫ໘༗ଟগۮᏐ䏆ʁ [1,2,3,4,5,6,7].filter { $0 %
2 == 0 }.count • Ṝᒬతሜ๏ଖመ䋯తൺֱຫɼfilter ။ઌ䋯Ұ࣍ ᅲɼ count ။࠶䋯Ұ࣍
[SE-0220] count(where:) [1,2,3,4,5,6,7].reduce(0) { $0 + ($1 % 2 ==
0 ? 1 : 0) } • Ṝᒬతሜ๏䋯తൺֱշɼୠੋ䔟㣛ੋࡏ၏ॄኄɻ
[SE-0220] count(where:) var count = 0 for n in [1,2,3,4,5,6,7]
{ count += n % 2 == 0 ? 1 : 0 } • reduce Ұᒬշɼෆաɻ
[SE-0220] count(where:) [1,2,3,4,5,6,7].count{$0 % 2 == 0} • ৽⃧ Sequence#countɼ䋯ىိ
reduce Ұᒬշɼ ෆաൺֱ໌֬ɻ
[SE-0224] Support 'less than' operator in compilation conditions #if swift(>=5.0)
print("this is 5.0") #endif • ݱࡏՄҎ༻্໘తํ๏ိᏗ Swift ൛ຊ • ෆաೳ༻ >=ɼཁখԙೳ༻ ! ိᒾҰෆੋ >= #if !swift(>=5.0) print("this is not 5.0") #endif
[SE-0224] Support 'less than' operator in compilation conditions #if swift(<5.0)
print("this is not 5.0") #endif • ೭ޙՄҎ༻ < ိᏗ Swift ൛ຊ
[SE-0225] isEven, isOdd, isMultiple • ᧷ಘ㑌࣍ཁሜ n % 2 ==
0 䆩ʁ • େՈ᧷ಘ -3 % 2 ੋଟগ䏆ʁ
[SE-0225] isEven, isOdd, isMultiple • ༗ਓఏҊཁՃ n.isEven, n.isOdd, n.isMultiple(of:) •
࠷ޙ༗ n.isMultiple(of:) ௨աɼ။Ճ౸ Swift 5 ཫɻ • ֩৺ᅶୂ᧷ಘ isEven Ṝछ؆ᄸతେՈࣗݾሜबɻ رೳޠݴతද໘ੵେখ߇੍ɻ
[SE-0226] Package Manager Target Based Dependency Resolution • Ұݸ Package
ཫ໘ৗৗ༗ଟෆಉ target, 㑌ݸ target ༗֤ࣗత dependencyɻݱࡏ༻ྃҰݸ Package ब။ॴ༗త dependency ਐိɼ೭ ޙ။༗༻౸త targetɻ
ྛ [SE-0226] Package Manager Target Based Dependency Resolution ߳া ᘈᘈ
ᘆࢠ थ
ྛ [SE-0226] Package Manager Target Based Dependency Resolution ߳া ᘈᘈ
ᘆࢠ थ
Community • 㟬ঋڃ iOS beta ྃ䆩ʁ • 㟬ใ໊ iplayground ྃ䆩ʁ
iOS 12 beta upgrade •
iPlayground • https://iplayground.io 10/20()-21(ʣ • ݱਖ਼ᄧථɼ㐸ߘதɻ