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
72
Generalized accessors
Takuma Shimizu
March 27, 2019
Tweet
Share
More Decks by Takuma Shimizu
See All by Takuma Shimizu
Swift Attributes
hokuron
0
380
Peek in Calendar implementation of swift-foundation
hokuron
0
160
MVVM
hokuron
0
44
Summon Rust from Swift
hokuron
0
640
Opaque Result Type in Swift with Rust
hokuron
0
150
Ownership of Swift as seen from iteration and Rust
hokuron
1
640
Clean Architecture 3
hokuron
0
38
Clean Architecture 2
hokuron
0
58
Create MLで犬と猫の肉球を学習
hokuron
0
93
Other Decks in Programming
See All in Programming
Accelerate your key learnings of scaling modern Android apps
aldefy
0
100
クックパッド検索システム統合/Cookpad Search System Consolidation
giga811
0
200
Ça bouge du côté des animations CSS !
goetter
2
170
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
9
1.7k
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
1
260
高セキュリティ・高耐障害性・サブシステム化。そして2億円
tasukulab280
2
410
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
840
はじめての Go * WASM * OCR
sgash708
1
130
From the Wild into the Clouds - Laravel Meetup Talk
neverything
0
190
Google Cloudとo11yで実現するアプリケーション開発者主体のDB改善
nnaka2992
1
160
DevNexus - Create AI Infused Java Apps with LangChain4j
kdubois
0
150
未経験でSRE、はじめました! 組織を支える役割と軌跡
curekoshimizu
1
230
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
590
Side Projects
sachag
452
42k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Facilitating Awesome Meetings
lara
53
6.3k
A Philosophy of Restraint
colly
203
16k
Mobile First: as difficult as doing things right
swwweet
223
9.5k
The Language of Interfaces
destraynor
156
24k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Become a Pro
speakerdeck
PRO
26
5.2k
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
!