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
82
Generalized accessors
Takuma Shimizu
March 27, 2019
Tweet
Share
More Decks by Takuma Shimizu
See All by Takuma Shimizu
Swift Attributes
hokuron
0
440
Peek in Calendar implementation of swift-foundation
hokuron
0
200
MVVM
hokuron
0
51
Summon Rust from Swift
hokuron
0
680
Opaque Result Type in Swift with Rust
hokuron
0
170
Ownership of Swift as seen from iteration and Rust
hokuron
1
690
Clean Architecture 3
hokuron
0
57
Clean Architecture 2
hokuron
0
74
Create MLで犬と猫の肉球を学習
hokuron
0
100
Other Decks in Programming
See All in Programming
AI 時代だからこそ抑えたい「価値のある」PHP ユニットテストを書く技術 #phpconfuk / phpcon-fukuoka-2025
shogogg
1
580
AI時代もSEOを頑張っている話
shirahama_x
0
100
レイトレZ世代に捧ぐ、今からレイトレを始めるための小径
ichi_raven
0
460
最新のDirectX12で使えるレイトレ周りの機能追加について
projectasura
0
280
How Software Deployment tools have changed in the past 20 years
geshan
0
480
例外処理を理解して、設計段階からエラーを見つけやすく、起こりにくく #phpconfuk
kajitack
12
6.3k
複数チーム並行開発下でのコード移行アプローチ ~手動 Codemod から「生成AI 活用」への進化
andpad
0
180
生成AIを活用したリファクタリング実践 ~コードスメルをなくすためのアプローチ
raedion
0
110
アーキテクチャと考える迷子にならない開発者テスト
irof
9
3.2k
DartASTとその活用
sotaatos
2
140
Atomics APIを知る / Understanding Atomics API
ssssota
1
150
仕様がそのままテストになる!Javaで始める振る舞い駆動開発
ohmori_yusuke
8
4.6k
Featured
See All Featured
Fireside Chat
paigeccino
41
3.7k
Building Applications with DynamoDB
mza
96
6.8k
Embracing the Ebb and Flow
colly
88
4.9k
How STYLIGHT went responsive
nonsquared
100
5.9k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Faster Mobile Websites
deanohume
310
31k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
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
!