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
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
190
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
Making the RBS Parser Faster
soutaro
0
700
実用!Hono RPC2026
yodaka
2
310
20260514_its_the_context_window_stupid.pdf
heita
0
920
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
150
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
350
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
260
JCON - Create Agentic AI Apps, The Easy Way!
kdubois
1
110
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
20k
AI Agent と正しく分析するための環境作り
yoshyum
2
380
ハーネスエンジニアリングとは?
kinopeee
13
6.9k
Featured
See All Featured
For a Future-Friendly Web
brad_frost
183
10k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
How to build a perfect <img>
jonoalderson
1
5.5k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
740
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
340
The Invisible Side of Design
smashingmag
302
52k
Between Models and Reality
mayunak
3
290
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
180
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
!