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
88
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
160
Swift Attributes
hokuron
0
460
Peek in Calendar implementation of swift-foundation
hokuron
0
240
MVVM
hokuron
0
66
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
CDK Deployのための ”反響定位”
watany
4
780
UIの境界線をデザインする | React Tokyo #15 メイントーク
sasagar
2
360
ハンズオンで学ぶクラウドネイティブ
tatsukiminami
0
130
Programming with a DJ Controller — not vibe coding
m_seki
3
110
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
110
Liberating Ruby's Parser from Lexer Hacks
ydah
2
1.4k
セグメントとターゲットを意識するプロポーザルの書き方 〜採択の鍵は、誰に刺すかを見極めるマーケティング戦略にある〜
m3m0r7
PRO
0
560
AIエージェントで業務改善してみた
taku271
0
530
実用!Hono RPC2026
yodaka
2
230
10 Tips of AWS ~Gen AI on AWS~
licux
5
410
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
610
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
790
Featured
See All Featured
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
94
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
First, design no harm
axbom
PRO
2
1.2k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
180
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
720
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
340
For a Future-Friendly Web
brad_frost
183
10k
Optimizing for Happiness
mojombo
378
71k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
100
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
!