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
83
Generalized accessors
Takuma Shimizu
March 27, 2019
Tweet
Share
More Decks by Takuma Shimizu
See All by Takuma Shimizu
Swift Attributes
hokuron
0
450
Peek in Calendar implementation of swift-foundation
hokuron
0
220
MVVM
hokuron
0
55
Summon Rust from Swift
hokuron
0
700
Opaque Result Type in Swift with Rust
hokuron
0
170
Ownership of Swift as seen from iteration and Rust
hokuron
1
710
Clean Architecture 3
hokuron
0
62
Clean Architecture 2
hokuron
0
79
Create MLで犬と猫の肉球を学習
hokuron
0
100
Other Decks in Programming
See All in Programming
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
180
Raku Raku Notion 20260128
hareyakayuruyaka
0
430
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
480
株式会社 Sun terras カンパニーデック
sunterras
0
2k
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
190
CSC307 Lecture 10
javiergs
PRO
1
690
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜
kuro_kurorrr
3
1.6k
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
370
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
390
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
880
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
2
180
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
320
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
2
280
The SEO Collaboration Effect
kristinabergwall1
0
380
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
620
So, you think you're a good person
axbom
PRO
2
1.9k
Become a Pro
speakerdeck
PRO
31
5.8k
Raft: Consensus for Rubyists
vanstee
141
7.3k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
120
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
130
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
sira's awesome portfolio website redesign presentation
elsirapls
0
170
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
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
!