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
82
Unearth Ruby builtin Gems 發掘 Ruby 的內建 Gems
johnlinvc
0
220
Ruby 型別檢查工具簡介
johnlinvc
0
420
Swift Actor 實作探索
johnlinvc
0
140
用 mruby 來寫跨平台工具
johnlinvc
0
66
Actor model 簡介
johnlinvc
0
170
一起玩 Helm 3
johnlinvc
1
110
為什麼 App 卡卡的
johnlinvc
2
1.1k
如何使用 byebug 來除錯 Ruby 程式
johnlinvc
0
180
Other Decks in Programming
See All in Programming
Drawing Heighway’s Dragon- Recursive Function Rewrite- From Imperative Style in Pascal 64 To Functional Style in Scala 3
philipschwarz
PRO
0
160
ABEMA iOS 大規模プロジェクトにおける段階的な技術刷新 / ABEMA iOS Technology Upgrade
akkyie
1
250
PEPCは何を変えようとしていたのか
ken7253
3
310
CloudRun, Spanner に対する負荷試験の反省と オブザーバビリティによるアプローチ
oyasumipants
1
180
[JAWS DAYS 2025] 最近の DB の競合解決の仕組みが分かった気になってみた
maroon1st
0
170
Introduction to C Extensions
sylph01
3
120
5分で理解する SOLID 原則 #phpcon_nagoya
shogogg
1
410
はじめての Go * WASM * OCR
sgash708
1
120
たのしいSocketのしくみ / Socket Under a Microscope
coe401_
8
1.4k
Better Code Design in PHP
afilina
0
180
color-scheme: light dark; を完全に理解する
uhyo
7
510
From the Wild into the Clouds - Laravel Meetup Talk
neverything
0
180
Featured
See All Featured
The Invisible Side of Design
smashingmag
299
50k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
Automating Front-end Workflow
addyosmani
1369
200k
Designing Experiences People Love
moore
140
23k
Being A Developer After 40
akosma
89
590k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
440
Agile that works and the tools we love
rasmusluckow
328
21k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Rails Girls Zürich Keynote
gr2m
94
13k
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