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
43
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
49
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
200
Ruby 型別檢查工具簡介
johnlinvc
0
400
Swift Actor 實作探索
johnlinvc
0
130
用 mruby 來寫跨平台工具
johnlinvc
0
56
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
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
100
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
受け取る人から提供する人になるということ
little_rubyist
0
230
EventSourcingの理想と現実
wenas
6
2.3k
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
Click-free releases & the making of a CLI app
oheyadam
2
120
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
670
Remix on Hono on Cloudflare Workers
yusukebe
1
290
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Building Your Own Lightsaber
phodgson
103
6.1k
Facilitating Awesome Meetings
lara
50
6.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
How GitHub (no longer) Works
holman
310
140k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Side Projects
sachag
452
42k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Pragmatic Product Professional
lauravandoore
31
6.3k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
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