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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Takuma Shimizu
March 27, 2019
Programming
0
88
Generalized accessors
Takuma Shimizu
March 27, 2019
Tweet
Share
More Decks by Takuma Shimizu
See All by Takuma Shimizu
RailsのValidatesをSwift Macrosで再現してみた
hokuron
0
140
Swift Attributes
hokuron
0
460
Peek in Calendar implementation of swift-foundation
hokuron
0
230
MVVM
hokuron
0
59
Summon Rust from Swift
hokuron
0
710
Opaque Result Type in Swift with Rust
hokuron
0
180
Ownership of Swift as seen from iteration and Rust
hokuron
1
720
Clean Architecture 3
hokuron
0
69
Clean Architecture 2
hokuron
0
86
Other Decks in Programming
See All in Programming
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
160
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
170
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
340
20260315 AWSなんもわからん🥲
chiilog
2
180
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
200
安いハードウェアでVulkan
fadis
1
830
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
650
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
210
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
430
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
310
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
220
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
670
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Scaling GitHub
holman
464
140k
Fireside Chat
paigeccino
42
3.9k
Building the Perfect Custom Keyboard
takai
2
720
Making Projects Easy
brettharned
120
6.6k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
290
Crafting Experiences
bethany
1
96
Agile that works and the tools we love
rasmusluckow
331
21k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
98
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Context Engineering - Making Every Token Count
addyosmani
9
780
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
!