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
67
Generalized accessors
Takuma Shimizu
March 27, 2019
Tweet
Share
More Decks by Takuma Shimizu
See All by Takuma Shimizu
Swift Attributes
hokuron
0
370
Peek in Calendar implementation of swift-foundation
hokuron
0
150
MVVM
hokuron
0
43
Summon Rust from Swift
hokuron
0
630
Opaque Result Type in Swift with Rust
hokuron
0
140
Ownership of Swift as seen from iteration and Rust
hokuron
1
630
Clean Architecture 3
hokuron
0
35
Clean Architecture 2
hokuron
0
54
Create MLで犬と猫の肉球を学習
hokuron
0
89
Other Decks in Programming
See All in Programming
SRE、開発、QAが協業して挑んだリリースプロセス改革@SRE Kaigi 2025
nealle
1
3.3k
Spring gRPC について / About Spring gRPC
mackey0225
0
180
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
450
Linux && Docker 研修/Linux && Docker training
forrep
23
4.1k
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
150
watsonx.ai Dojo #6 継続的なAIアプリ開発と展開
oniak3ibm
PRO
0
270
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
310
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2k
“あなた” の開発を支援する AI エージェント Bedrock Engineer / introducing-bedrock-engineer
gawa
10
1.4k
自動で //nolint を挿入する取り組み / Gopher's Gathering
utgwkk
1
170
ESLintプラグインを使用してCDKのセオリーを適用する
yamanashi_ren01
2
380
最近のVS Codeで気になるニュース 2025/01
74th
1
240
Featured
See All Featured
The Cult of Friendly URLs
andyhume
78
6.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Building Your Own Lightsaber
phodgson
104
6.2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
6
220
Practical Orchestrator
shlominoach
186
10k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
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
!