Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Swift weekly 2018/09/04
Johnlin
September 04, 2018
Programming
0
55
Swift weekly 2018/09/04
Johnlin
September 04, 2018
Tweet
Share
More Decks by Johnlin
See All by Johnlin
Swift Actor 實作探索
johnlinvc
0
96
用 mruby 來寫跨平台工具
johnlinvc
0
26
Actor model 簡介
johnlinvc
0
61
一起玩 Helm 3
johnlinvc
1
51
為什麼 App 卡卡的
johnlinvc
2
860
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
91
Life of a Cell
johnlinvc
0
1.2k
Swift warm up NSUUID
johnlinvc
0
53
Swift weekly 2018/08/07
johnlinvc
0
52
Other Decks in Programming
See All in Programming
ISUCON12 事前講習
rosylilly
3
4.3k
IE Graduation (IE の功績を讃える)
jxck
20
12k
即、New Relic / New Relic NOW!
uzulla
0
310
[DevTrends - Jun/2022] Arquitetura baseada em eventos
camilacampos
0
110
シェーダー氷山発掘記
logilabo
0
140
Baseline Profilesでアプリのパフォーマンスを向上させる / Improve app performance with Baseline Profiles
numeroanddev
0
230
Reactive Java Microservices on Kubernetes with Spring and JHipster
deepu105
1
170
Jetpack Compose best practices 動画紹介 @GoogleI/O LT会
takakitojo
0
300
1時間半で克服するJavaScriptの非同期処理/async_javascript_kokufuku
marchin1989
2
610
短納期でローンチした新サービスをJavaで開発した話/launched new service using Java
eichisanden
6
1.9k
Terraform Plan/Apply結果の自動通知
ymmy02
0
280
Beyond Micro Frontends: Frontend Moduliths for the Enterprise @wad2022
manfredsteyer
PRO
0
130
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
57
5.3k
GitHub's CSS Performance
jonrohan
1020
420k
The Cult of Friendly URLs
andyhume
68
4.8k
Web development in the modern age
philhawksworth
197
9.3k
Product Roadmaps are Hard
iamctodd
34
6.5k
Raft: Consensus for Rubyists
vanstee
126
5.4k
The Mythical Team-Month
searls
209
39k
Keith and Marios Guide to Fast Websites
keithpitt
404
21k
What's new in Ruby 2.0
geeforr
336
30k
Happy Clients
brianwarren
89
5.6k
The Pragmatic Product Professional
lauravandoore
19
3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
56
2.3k
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(ʣ • ݱਖ਼ᄧථɼ㐸ߘதɻ