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
430
Peek in Calendar implementation of swift-foundation
hokuron
0
190
MVVM
hokuron
0
51
Summon Rust from Swift
hokuron
0
680
Opaque Result Type in Swift with Rust
hokuron
0
160
Ownership of Swift as seen from iteration and Rust
hokuron
1
690
Clean Architecture 3
hokuron
0
54
Clean Architecture 2
hokuron
0
69
Create MLで犬と猫の肉球を学習
hokuron
0
100
Other Decks in Programming
See All in Programming
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
690
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
3
230
Laravel Boost 超入門
fire_arlo
3
220
Design Foundational Data Engineering Observability
sucitw
3
200
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
270
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
120
1から理解するWeb Push
dora1998
7
1.9k
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
1.5k
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
600
OSS開発者という働き方
andpad
5
1.7k
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
860
Featured
See All Featured
Gamification - CAS2011
davidbonilla
81
5.4k
Thoughts on Productivity
jonyablonski
70
4.8k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
The Language of Interfaces
destraynor
161
25k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.7k
Designing Experiences People Love
moore
142
24k
It's Worth the Effort
3n
187
28k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
112
20k
GraphQLとの向き合い方2022年版
quramy
49
14k
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
!