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
130
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
160
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
280
Ruby 型別檢查工具簡介
johnlinvc
0
500
Swift Actor 實作探索
johnlinvc
0
160
用 mruby 來寫跨平台工具
johnlinvc
0
85
Actor model 簡介
johnlinvc
0
200
一起玩 Helm 3
johnlinvc
1
130
為什麼 App 卡卡的
johnlinvc
2
1.2k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
220
Other Decks in Programming
See All in Programming
Google Opalで使える37のライブラリ
mickey_kubo
3
180
モテるデスク環境
mozumasu
3
1.4k
EMこそClaude Codeでコード調査しよう
shibayu36
0
540
マイベストのシンプルなデータ基盤の話 - Googleスイートとのつき合い方 / mybest-simple-data-architecture-google-nized
snhryt
0
110
Migration to Signals, Resource API, and NgRx Signal Store
manfredsteyer
PRO
0
140
Module Proxyのマニアックな話 / Niche Topics in Module Proxy
kuro_kurorrr
0
930
CSC305 Lecture 12
javiergs
PRO
0
250
CSC305 Lecture 13
javiergs
PRO
0
340
Vueのバリデーション、結局どれを選べばいい? ― 自作バリデーションの限界と、脱却までの道のり ― / Which Vue Validation Library Should We Really Use? The Limits of Self-Made Validation and How I Finally Moved On
neginasu
3
1.8k
ドメイン駆動設計のエッセンス
masuda220
PRO
15
7.2k
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
170
三者三様 宣言的UI
kkagurazaka
0
330
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
Building an army of robots
kneath
306
46k
A Modern Web Designer's Workflow
chriscoyier
697
190k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Faster Mobile Websites
deanohume
310
31k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
Why Our Code Smells
bkeepers
PRO
340
57k
Side Projects
sachag
455
43k
Code Review Best Practice
trishagee
72
19k
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