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
40
Swift Weekly 2017-09-05
Johnlin
September 05, 2017
Tweet
Share
More Decks by Johnlin
See All by Johnlin
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
110
Ruby 型別檢查工具簡介
johnlinvc
0
310
Swift Actor 實作探索
johnlinvc
0
130
用 mruby 來寫跨平台工具
johnlinvc
0
49
Actor model 簡介
johnlinvc
0
120
一起玩 Helm 3
johnlinvc
1
82
為什麼 App 卡卡的
johnlinvc
2
1k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
140
Life of a Cell
johnlinvc
0
1.3k
Other Decks in Programming
See All in Programming
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
410
入門 AWS Amplify Gen2 / Introduction to AWS Amplify Gen2
genkiogasawara
1
330
Changed Rules: Architectures with Lightweight Stores
manfredsteyer
PRO
0
240
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
360
From Spring Boot 2 to Spring Boot 3 with Java 22 and Jakarta EE
ivargrimstad
0
1.1k
Blue/Greenデプロイの導入による 運用フローの改善
kudoas
1
370
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
170
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
280
エンターテイメント業界で利用されるAWS
demuyan
0
210
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
120
新宿ダンジョンを可視化してみた
satoshi7190
2
240
Fragment Composition of GraphQL
quramy
3
550
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
319
37k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
25
2.3k
The Invisible Customer
myddelton
114
12k
Building a Modern Day E-commerce SEO Strategy
aleyda
17
6.4k
The Cost Of JavaScript in 2023
addyosmani
16
3.8k
Rebuilding a faster, lazier Slack
samanthasiow
73
8.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
[RailsConf 2023] Rails as a piece of cake
palkan
23
3.9k
Six Lessons from altMBA
skipperchong
21
3k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
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