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
Generalized accessors
Search
Takuma Shimizu
March 27, 2019
Programming
0
83
Generalized accessors
Takuma Shimizu
March 27, 2019
Tweet
Share
More Decks by Takuma Shimizu
See All by Takuma Shimizu
Swift Attributes
hokuron
0
450
Peek in Calendar implementation of swift-foundation
hokuron
0
220
MVVM
hokuron
0
53
Summon Rust from Swift
hokuron
0
690
Opaque Result Type in Swift with Rust
hokuron
0
170
Ownership of Swift as seen from iteration and Rust
hokuron
1
710
Clean Architecture 3
hokuron
0
61
Clean Architecture 2
hokuron
0
79
Create MLで犬と猫の肉球を学習
hokuron
0
100
Other Decks in Programming
See All in Programming
AgentCoreとHuman in the Loop
har1101
5
220
Oxlint JS plugins
kazupon
1
770
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
Patterns of Patterns
denyspoltorak
0
1.4k
CSC307 Lecture 02
javiergs
PRO
1
770
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
4
330
Fluid Templating in TYPO3 14
s2b
0
130
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
990
CSC307 Lecture 06
javiergs
PRO
0
680
Data-Centric Kaggle
isax1015
2
760
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
310
GraphQLとの向き合い方2022年版
quramy
50
14k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Optimizing for Happiness
mojombo
379
71k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
180
Amusing Abliteration
ianozsvald
0
96
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
430
Automating Front-end Workflow
addyosmani
1371
200k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
55
Transcript
subscrit get set
get let nums = Array(0..<10) let x10 = nums[3] *
10 // `get` print(num) subscript(index: Int) -> Element { get { let element = // `index` return element // } set { ... } }
set var nums = Array(0..<10) let num = nums[3] nums[3]
= num * 10 // `set` print(num) subscript(index: Int) -> Element { get { ... } set(newValue) { // `newValue` // buffer = newValue } }
Swift 4.2 mutableAddressWithPinnedNativeOwner Swift 5 read , modify yield co-routine
read // CoreAudio.swift subscript(index: Index) -> Element { _read {
yield ((_audioBuffersPointer + index).pointee) } } modify // Array.swift subscript(index: Int) -> Element { _modify { let address = _buffer.subscriptBaseAddress + index yield &address.pointee } }
yield subscript(index: Int) -> inout Element {} inout Rust Lifetime
Rust Swift
yield
!