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
Johnlin
September 05, 2017
Programming
0
47
Swift Weekly 2017-09-05
Johnlin
September 05, 2017
Tweet
Share
More Decks by Johnlin
See All by Johnlin
用 MLIR 實作 一個 Ruby IR (intermediate representation)
johnlinvc
0
130
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
260
Ruby 型別檢查工具簡介
johnlinvc
0
460
Swift Actor 實作探索
johnlinvc
0
160
用 mruby 來寫跨平台工具
johnlinvc
0
75
Actor model 簡介
johnlinvc
0
190
一起玩 Helm 3
johnlinvc
1
120
為什麼 App 卡卡的
johnlinvc
2
1.2k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
200
Other Decks in Programming
See All in Programming
エンジニア向け採用ピッチ資料
inusan
0
180
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
260
Benchmark
sysong
0
280
A2A プロトコルを試してみる
azukiazusa1
2
1.3k
Hypervel - A Coroutine Framework for Laravel Artisans
albertcht
1
110
WebViewの現在地 - SwiftUI時代のWebKit - / The Current State Of WebView
marcy731
0
110
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
0
500
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
720
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
220
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
170
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
390
アンドパッドの Go 勉強会「 gopher 会」とその内容の紹介
andpad
0
290
Featured
See All Featured
Six Lessons from altMBA
skipperchong
28
3.9k
Rebuilding a faster, lazier Slack
samanthasiow
82
9.1k
Navigating Team Friction
lara
187
15k
Why Our Code Smells
bkeepers
PRO
337
57k
Testing 201, or: Great Expectations
jmmastey
42
7.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
940
Thoughts on Productivity
jonyablonski
69
4.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
BBQ
matthewcrist
89
9.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
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