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-03-07
Search
Johnlin
March 07, 2017
Programming
1
120
Swift Weekly 2017-03-07
Johnlin
March 07, 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
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
Macとオーディオ再生 2024/11/02
yusukeito
0
370
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Ruby is Unlike a Banana
tanoku
97
11k
Docker and Python
trallard
40
3.1k
The Pragmatic Product Professional
lauravandoore
31
6.3k
The Invisible Side of Design
smashingmag
298
50k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Rails Girls Zürich Keynote
gr2m
94
13k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
A Philosophy of Restraint
colly
203
16k
BBQ
matthewcrist
85
9.3k
Transcript
Swift पใ 2017/03/07 John Lin @johnlinvc
From the core • swift-evolution swift-users ။ඃኺ mailing list
ൖ ౸ Discourse ஃ • Swift 4 ։࢝ୈೋ֊։ᚙ • Swift 4 తᚙྲྀఔቮެ։
swift-evolution swift-users ။ඃ ኺ mailing list ൖ౸ Discourse ஃ
• ༻ஃൺֱཧ፺ਘɻ • ။อཹemailࣜɼDiscourse ՄҎ༻ email ᚙจ ճจ
Swift 4 ։࢝ୈೋ֊։ᚙ • ቮៃୡఔࣜᛰԼ૬༰ • ABI ᜦఆཹ౸Ҏޙ࠶၏ • ։࢝၏Ҏલ㘸ཁ၏ୠؐᔒ၏త
Swift 4 ։࢝ୈೋ֊։ᚙ • ߋత String ʢඪੋ㐝ഊ Perl) • Integer
Protocol • ڧԽ Collection • ڧԽ Genericʢᔟܕʣ
Swift 4 తᚙྲྀఔቮެ։ • Swift 4 Լࢧԉ Swift 3.1 ఔࣜᛰ
• Swift 4 ՄҎ༻ Swift 3 త Package • ༬ܭ 2017 ळఱᚙ
Evolution • SE-0151 ݅ཧثࢦఆSwift ൛ຊ • SE-0152 ݅ࢦఆ݅ཧث൛ຊ • SE-0153
႔ཧ @NSCopying తෆҰகߦҝ • SE-0154 ሡ Dictionary త Keys Values վಛ త Collection
SE-0151 ݅ཧثࢦఆSwift ൛ຊ • ՄҎࡏPackage.swift ཫఆٛࢧԉత Swift ൛ຊɻ • ᔒሜతब݅ཧثੋ䬟Ұ൛ɻ
SE-0152 ݅ࢦఆ݅ཧث൛ ຊ • ༻ swift package tools-version --set <value>
ိઃఆ package త tools ൛ຊɼՄҎࡏ Package.swift ࠷ ্໘ଧ //swift-tools-version: 3.0.0 • ᔒઃత༬ઃ 3.0.0 • ။Լ૬༰ • Өڹ Package.swift ՄҎࢧԉత֨ࣜ
SE-0152 ݅ࢦఆ݅ཧث൛ ຊ
SE-0153 ႔ཧ @NSCopying త ෆҰகߦҝ • @NSCopy త Attribute ጯ֘။ሣ݅၏
deep copyɼ 㗞ੜ৽త݅ɻ • Swift ᔒ㭎๏खಈࢦఆཁ༻ Attribute ؐੋ iVarɻ • ኺObj-c ትိత׳ྫੋࡏ init ཫ༻ iVarɼଖଞํ ༻ Attributeɻ • ॴҎࡏ init ཫ႔ཧ NSCopy త౦။ᆦᎃ
SE-0153 ႔ཧ @NSCopying త ෆҰகߦҝ class Person : NSObject, NSCopying
{ var name:String var job:String init(name:String, job:String) { self.name=name self.job=job } func copy(with zone: NSZone? = nil) -> Any { let clone = Person.init(name: name, job: job) return clone } }
SE-0153 ႔ཧ @NSCopying త ෆҰகߦҝ class Pet { @NSCopying var
owner: Person init(owner:Person) { self.owner=owner } }
SE-0153 ႔ཧ @NSCopying త ෆҰகߦҝ
SE-0153 ႔ཧ @NSCopying త ෆҰகߦҝ • ಁա compiler త ∍ຐ๏ɼՌ
attribute ੋ @NSCopying ɼ बෆ༻ivar վ༻ attribute
SE-0154 ሡ Dictionary త Keys Values վಛత Collection •
ݱࡏཁፙಛఆత key ຫɻ • আඇ༻ಛఆతሜ๏࠽။շɻ • վಛ collection ޙ။Ұᒬշ
Community • ༗ਓ༻ Swift ሜྃҰݸ Swiftenv https://github.com/ mominul/swiftup