Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Swift5のOwnership
Search
8pockets
August 21, 2018
Programming
2.1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Swift5のOwnership
8pockets
August 21, 2018
Transcript
17 slides
Swift5ͷOwnership ΑΓࡉ͔͍ϝϞϦཧ
ࣗݾհ • ࢁᏴޗ @8pockets • Python, Go, PHP, Swift, C++
• swiftྺ
࣍ • Swift5ʹ͍ͭͯ • ݱঢ়ͷ՝ͱOwnershipಋೖͷཧ༝ • Ownershipͷ̏ͭͷػೳ
Swift5ʹ͍ͭͯ Early 2019 ϦϦʔε༧ఆ • ABI(Application Binary Interface)ͷ҆ఆԽ • ඪ४ϥΠϒϥϦʹඞཁͱͳΔδΣωϦΫε
• API resilience • Memory ownership model ࢀߟɿhttps://github.com/apple/swift-evolution
Ownershipಋೖͷཧ༝ $16ͷੑೳΛ׆͔͖͠Δ
ݱঢ়ͷ՝ • ࢀরΧϯτͱϢχʔΫੑͷݕࠪΦʔόʔϔου • ͍ͭͰΛίϐʔͰ͖Δঢ়ଶͩͱόοϑΝ͕Ұ ൠʹώʔϓ֬อ͞ΕΔɻελοΫ֬อʹ͢ΔͱΑ Γޮత SwiftͰCOWܕ͕͘ΘΕ͖ͯͨɻ͚Ͳ͍͘ Β͔ͷ͋Δɻ
ݱঢ়ͷ՝ •ίϐʔΦϯϥΠτ (Copy-On-Write) ίϐʔཁٻ͞ΕͯɺίϐʔΛͨ͠;ΓΛͯ͠ɺͱΓ ͋͑ͣݪຊΛͦͷ··ࢀর͢Δɺݪຊ·ͨίϐʔͷ ͲͪΒ͔Λॻ͖͑Α͏ͱͨ࣌͠ʹίϐʔ͕ى͜Δ ͜ΕʹΑͬͯ͋ΔఔͷύϑΥʔϚϯεͷΛΧόʔ ͍ͯͨ͠ɻ ΑΓߴͳνϡʔχϯάΛՄೳʹͨ͠ͷ͕Ownership
Ownershipಋೖͷཧ༝ ͜Ε·ͰϝϞϦίϐʔ͍ͯͨ͠໘ͰɺϦιʔεΛି͠ ͨΓआΓͨΓͰ͖ΔΑ͏ʹͳΓɺΑΓߴʹॲཧ͕ॻ͚ Δ ར༻έʔε • ԻॲཧͳͲͷϦΞϧλΠϜੑΛඞཁͱ͢Δॲཧ • αʔόʔαΠυSwift
Ownershipͷ̏ͭͷػೳ
Ownershipͷ̏ͭͷػೳ • ഉଞଇ - The Law of Exclusivity • shared
- Shared values • ίϐʔෆՄೳͳܕ - moveonly
ഉଞଇ • Swift4ͰϦϦʔεࡁ • ͋Δͷॻ͖ࠐΈΞΫηε͕ഉଞతͰ͋Δ ࣄΛڧ੍͢ΔɻͦͷଞͷΞΫηε͕ಉ࣌ʹੜ ͡ΔࣄΛېࢭ
ഉଞଇ ؔͷJOPVUҾʹมΛ͢ GVODGPP @UNQJOPVU4USJOH @UNQJOPVU4USJOH \^ WBSB4USJOHlUFTU GPP B B
ˠিಥ NVUBUJOHGVODͳϝιουΛݺͿ WBSY FYUFOTJPO*OU\ NVUBUJOHGVODBTTJHO3FTVMU0G @GVODUJPO *OU \ TFMGGVODUJPO ^ ^ YBTTJHO3FTVMU0G\Y ^ˠিಥ
shared GVODTBNQMF WBMVFTIBSFETUSJOH \ WBMVFมMFUͷΑ͏ʹѻΘΕΔɻ ^ ίϐʔ͕Ͱ͖ͳ͍ܕΛ࡞ΕΔΑ͏ʹͳΔ
shared ௨ৗͷҾ ؔΛݺͼग़͢ࡍʹ͕ίϐʔ͞ΕΔͨΊɺ ίετ͕͔͔Δ inoutࢀর ͦͷετϨʔδͷϙΠϯλΛ͚ͩ͢Ͱ͋Γɺ ͦͷΑ͏ͳίϐʔίετ͕͔͔Βͣߴ ॻ͖ࠐΈՄೳ sharedࢀর JOPVUͷಡΈऔΓઐ༻
ݺͼग़͠ଆʹΞϯύαϯυ Λ͚ͭΔඞཁ͕ͳ͍
ίϐʔෆՄೳͳܕ NPWFPOMZTUSVDU)PHF\^ WBSB)PHF B͔ΒCʹϦιʔεͷॴ༗ݖ͕Ҡಈ BࣗಈͰղ์͞ΕΔ WBSCNPWF B ίϯύΠϧΤϥʔ
QSJOU B ίϐʔ͕Ͱ͖ͳ͍ܕΛ࡞ΕΔΑ͏ʹͳΔ
ίϐʔෆՄೳͳܕ มശͰͳ͘ɺʹ͚ͭͨϥϕϧ WBSB)PHF WBSCNPWF B ॴ༗ऀ͕͍ͳ͘ͳͬͨϦιʔεࣗಈͰղ์͞ΕΔ
END
Other Decks in Programming
See All in Programming
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.4k
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.1k
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
270
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
250
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
310
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
430
小さなアプリを作って公開するまで
onozaty
0
200
LLM 101
dalinaum
0
510
AI-Powered Domain-Driven Design
ziobrando
0
470
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
180
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
350
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
310
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
433
67k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Optimizing for Happiness
mojombo
378
72k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
880
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
580
The SEO Collaboration Effect
kristinabergwall1
1
620
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
340
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k