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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
220
SODA - FACT BOOK(EN)
sodainc
1
220
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
820
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
240
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
310
AI Augmentation Techniques with Liberty
ivargrimstad
1
420
Modernizing iOS Apps
seyfoyun
0
150
LLM 101
dalinaum
0
480
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.3k
AmebaブログはKMPから卒業します
kmars0605
0
340
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
190
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
4
4.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
820
Skip the Path - Find Your Career Trail
mkilby
1
290
Are puppies a ranking factor?
jonoalderson
2
4.2k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
930
Visualization
eitanlees
153
17k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
770
The untapped power of vector embeddings
frankvandijk
2
2k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
60k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Transcript
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