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
89
0
Share
Generalized accessors
Takuma Shimizu
March 27, 2019
More Decks by Takuma Shimizu
See All by Takuma Shimizu
RailsのValidatesをSwift Macrosで再現してみた
hokuron
0
170
Swift Attributes
hokuron
0
460
Peek in Calendar implementation of swift-foundation
hokuron
0
240
MVVM
hokuron
0
72
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
730
Clean Architecture 3
hokuron
0
70
Clean Architecture 2
hokuron
0
87
Other Decks in Programming
See All in Programming
Making the RBS Parser Faster
soutaro
0
710
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
120
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.9k
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
460
書き換えて学ぶTemporal #fukts
pirosikick
2
370
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
21k
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
650
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.6k
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
280
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
3.1k
【ディップ|26年新卒研修資料】TDD実装演習
dip_tech
PRO
0
180
Featured
See All Featured
Marketing to machines
jonoalderson
1
5.3k
We Have a Design System, Now What?
morganepeng
55
8.1k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.4k
Paper Plane
katiecoart
PRO
1
50k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.9k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
290
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
250
Optimising Largest Contentful Paint
csswizardry
37
3.7k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
120
Code Review Best Practice
trishagee
74
20k
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
!