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 2017-09-05
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Johnlin
September 05, 2017
Programming
55
0
Share
Swift Weekly 2017-09-05
Johnlin
September 05, 2017
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
260
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
340
Ruby 型別檢查工具簡介
johnlinvc
0
570
Swift Actor 實作探索
johnlinvc
0
190
用 mruby 來寫跨平台工具
johnlinvc
0
110
Actor model 簡介
johnlinvc
0
230
一起玩 Helm 3
johnlinvc
1
150
為什麼 App 卡卡的
johnlinvc
2
1.3k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
240
Other Decks in Programming
See All in Programming
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
180
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
140
Coding as Prompting Since 2025
ragingwind
0
840
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
160
Back to the roots of date
jinroq
0
110
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
500
의존성 주입과 모듈화
fornewid
0
140
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
5k
GitHubCopilotCLIをはじめよう.pdf
htkym
0
190
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
0
190
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
190
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
180
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
170
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
320
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
260
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
69
39k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Balancing Empowerment & Direction
lara
6
1.1k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
27
3.4k
Between Models and Reality
mayunak
3
270
Transcript
Swift पใ 2017/09/04 John Lin @johnlinvc
From the core • Swift 4 : End game •
Swift 5 : Start your engine • Swift refactor ۩։ݯ
Swift 4 : End game • Swift 4 ਐೖᏅඌ֊ஈɻෆ࠶डमվత proposal
ɻ • ༬ܭ 2017 ఈલ။ਖ਼ࣜᚙɻ
Swift 5 : Start your engine • ։࢝։ᚙ Swift 5
• ओཁඪ: ᜦఆ ABI(application binary interface) • ॴ༗ ABI ༗᮫త౦धཁ၏ɼแؚɿ • ߋڧత Generic: ૾ੋ recursive protocol • ڧ݈త API: ᩋ API ࡏ ABI ෆᏓతگԼਐߦमվ • Memory Ownership model: (opt-in) Rust ෩֨తهԱᱪཧɼᩋ Ꮘೳߋߴɻ
Swift 5 : Start your engine • ࣍ཁඪ: • ߋූ߹ਓᱪላత
String: ඪੋ㐝ഊ Perl • վਐ std lib: ᩋଞߋ༻Ұᴍ • վਐ Foundation: ݱࡏؐ༗Ұථᔒಘ༻ • ৽⃧ޠ๏ɿᔒඞཁෆ။վɼՌతؐੋ။վ • ҝ৽తconcurrent model ฯ࿏ : ୠੋᔒ༗ཁ၏౸ɻ
Swift 5 : Start your engine • Swift 4
ҰᒬɼSwift 5 ՄҎબ Swift 4 ࣜɻఔࣜ ᛰશ૬༰ɻෆաෆอᨽೳࢧԉ Swift 3ɻ 2018 ॳ ။֬ೝೳෆೳࢧԉ 3. • Coming Soooon at 2018
Swift refactor ۩։ݯ • 䈕Ҋ㚎తॏߏ۩ቮៃ։ݯྃɼෆաލ䈕Ҋతؐᔒɻ • ༗ၷछॏߏࣜɼࢦඪࣜൣᅴࣜɻ • ࢦඪࣜแؚ໊ࣈɼlocalize ࣈ۲
• ൣᅴࣜแؚ நग़expression, நग़ํ๏ • ॴҎݱࡏՄҎࣗݾሜ refactor tool ྃɻ
Evolution • [SE-0185] ࣗಈ߹ Equatable ᢛ Hashable
[SE-0185] ࣗಈ߹ Equatable ᢛ Hashable • ݱࡏཁᩋࣗݾత struct/class ՄҎ༻ ==
༗ᴍຑ struct Point : Equatable { let x : Double let y : Double init(x:Double, y:Double ) { self.x = x self.y = y } static func ==(lhs: Point, rhs: Point) -> Bool { return lhs.x == rhs.x && lhs.y == rhs.y } }
[SE-0185] ࣗಈ߹ Equatable ᢛ Hashable • ݱࡏཁᩋࣗݾత struct ՄҎ༻ ==
༗ᴍຑ struct Point : Equatable { ... static func ==(lhs: Point, rhs: Point) -> Bool { return lhs.x == rhs.x && lhs.y == rhs.y } } એࠂ࠽ೳ༻ == ҃ != let a = Point(x: 0, y: 0) let b = Point(x: 1, y: 1) a == a // true a != b // true
[SE-0185] ࣗಈ߹ Equatable ᢛ Hashable • 㑌Ұݸ struct ཁ༗
static func ==(lhs: Point, rhs: Point) -> Bool { return lhs.x == rhs.x && lhs.y == rhs.y } • ୠੋ㚎༰େಉখҟɼबੋ㑌Ұݸ property compare Ұ࣍ɻ
[SE-0185] ࣗಈ߹ Equatable ᢛ Hashable • ೭ޙՄҎཁ conform Equatable ब။ࣗಈ㗞ੜ
static func ==(lhs: Point, rhs: Point) -> Bool {} • ཫ໘။㑌ݸ property ൺֱҰ࣍ɻ • ෆ။ሣݱ༗త code ༗Өڹɻ ᔒ༗ confrom తबෆ။༗Ꮘ Ռɻ • ࢧԉ struct enum , ෆࢧԉ class , tuple • Hashable Ұᒬ။ࣗಈ㗞ੜɼᩋࢧԉ dict Ꮣಘߋ؆ᄸ
Community • Chris Lattner 䋯ڈ Google ྃɻۀత࣌ީҾᚙྃ concurrency େፌɻ •
https://gist.github.com/lattner/ 31ed37682ef1576b16bca1432ea9f782