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
46
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
120
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
250
Ruby 型別檢查工具簡介
johnlinvc
0
460
Swift Actor 實作探索
johnlinvc
0
160
用 mruby 來寫跨平台工具
johnlinvc
0
71
Actor model 簡介
johnlinvc
0
190
一起玩 Helm 3
johnlinvc
1
110
為什麼 App 卡卡的
johnlinvc
2
1.2k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
200
Other Decks in Programming
See All in Programming
つよそうにふるまい、つよい成果を出すのなら、つよいのかもしれない
irof
1
290
Javaのルールをねじ曲げろ!禁断の操作とその代償から学ぶメタプログラミング入門 / A Guide to Metaprogramming: Lessons from Forbidden Techniques and Their Price
nrslib
3
2k
ktr0731/go-mcpでMCPサーバー作ってみた
takak2166
0
160
Perplexity Slack Botを作ってAI活用を進めた話 / AI Engineering Summit プレイベント
n3xem
0
650
業務自動化をJavaとSeleniumとAWS Lambdaで実現した方法
greenflagproject
1
110
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
780
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
190
Perlで痩せる
yuukis
1
680
FormFlow - Build Stunning Multistep Forms
yceruto
1
170
A comprehensive view of refactoring
marabesi
0
470
Go Modules: From Basics to Beyond / Go Modulesの基本とその先へ
kuro_kurorrr
0
120
無関心の谷
kanayannet
0
160
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
How to Ace a Technical Interview
jacobian
276
23k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Writing Fast Ruby
sferik
628
61k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Done Done
chrislema
184
16k
Speed Design
sergeychernyshev
31
990
Measuring & Analyzing Core Web Vitals
bluesmoon
7
480
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
6
690
Typedesign – Prime Four
hannesfritz
42
2.7k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.8k
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