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
55
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
200
Ruby 型別檢查工具簡介
johnlinvc
0
410
Swift Actor 實作探索
johnlinvc
0
140
用 mruby 來寫跨平台工具
johnlinvc
0
59
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
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
220
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
情報漏洩させないための設計
kubotak
1
130
Symfony Mapper Component
soyuka
2
730
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
720
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
100
Haze - Real time background blurring
chrisbanes
1
510
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
470
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
3
380
Featured
See All Featured
Optimizing for Happiness
mojombo
376
70k
Rails Girls Zürich Keynote
gr2m
94
13k
Site-Speed That Sticks
csswizardry
2
190
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
A designer walks into a library…
pauljervisheath
204
24k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
A better future with KSS
kneath
238
17k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
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(ʣ • ݱਖ਼ᄧථɼ㐸ߘதɻ