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
81
Generalized accessors
Takuma Shimizu
March 27, 2019
Tweet
Share
More Decks by Takuma Shimizu
See All by Takuma Shimizu
Swift Attributes
hokuron
0
420
Peek in Calendar implementation of swift-foundation
hokuron
0
180
MVVM
hokuron
0
50
Summon Rust from Swift
hokuron
0
670
Opaque Result Type in Swift with Rust
hokuron
0
160
Ownership of Swift as seen from iteration and Rust
hokuron
1
670
Clean Architecture 3
hokuron
0
54
Clean Architecture 2
hokuron
0
68
Create MLで犬と猫の肉球を学習
hokuron
0
100
Other Decks in Programming
See All in Programming
NPOでのDevinの活用
codeforeveryone
0
720
A2A プロトコルを試してみる
azukiazusa1
2
1.3k
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
280
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
570
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
140
Team operations that are not burdened by SRE
kazatohiei
1
290
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
320
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
470
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
340
0626 Findy Product Manager LT Night_高田スライド_speaker deck用
mana_takada
0
140
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
1
6.6k
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
590
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
680
Building Applications with DynamoDB
mza
95
6.5k
Designing Experiences People Love
moore
142
24k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Speed Design
sergeychernyshev
32
1k
Visualization
eitanlees
146
16k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Site-Speed That Sticks
csswizardry
10
680
GitHub's CSS Performance
jonrohan
1031
460k
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
!