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
58
Swift weekly 2018/09/04
Johnlin
September 04, 2018
Tweet
Share
More Decks by Johnlin
See All by Johnlin
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
87
Ruby 型別檢查工具簡介
johnlinvc
0
300
Swift Actor 實作探索
johnlinvc
0
130
用 mruby 來寫跨平台工具
johnlinvc
0
47
Actor model 簡介
johnlinvc
0
120
一起玩 Helm 3
johnlinvc
1
79
為什麼 App 卡卡的
johnlinvc
2
1k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
130
Life of a Cell
johnlinvc
0
1.3k
Other Decks in Programming
See All in Programming
Microsoft Fabricを7ヶ月使ってわかったこと
shun_oshidari
2
450
mandaRa: R言語ユーザのための新しい知識共有の場 / mandara_tokyor111
s_uryu
2
410
生成 AI の中身を覗いてみよう〜基礎から医療現場での応用まで〜
soh9834
2
700
PHP8の機能を使って堅牢にコードを書く
fendo181
6
2k
PHPでOfficeファイルを取り扱う! PHP Officeライブラリを プロダクトに組み込んだ話
hirobe1999
0
750
ログラスの継続的なプロンプト改善のためのLLMOpsの今 / LLMOps at loglass now
rkaga
PRO
1
330
Learning PHP and Static Analysis with PHP Parser
inouehi
1
220
Learning Ruby
okuramasafumi
5
370
シェルの履歴とイクンリメンタル検索を使う
naoya
7
2.4k
メール認証とRuby
uvb_76
0
110
マイ隙間家具OSSたちのご紹介
karupanerura
2
130
CSRF対策のやり方、そろそろアップデートしませんか / Update your knowledge of CSRF protection
hiro_y
22
12k
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
21
3.8k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
101
6.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
67
38k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
1.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
219
21k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
How to name files
jennybc
62
91k
Product Roadmaps are Hard
iamctodd
43
9.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3k
The Cost Of JavaScript in 2023
addyosmani
13
3.7k
Building a Scalable Design System with Sketch
lauravandoore
455
32k
4 Signs Your Business is Dying
shpigford
174
21k
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(ʣ • ݱਖ਼ᄧථɼ㐸ߘதɻ