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
Takuma Shimizu
March 27, 2019
Programming
90
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Generalized accessors
Takuma Shimizu
March 27, 2019
More Decks by Takuma Shimizu
See All by Takuma Shimizu
RailsのValidatesをSwift Macrosで再現してみた
hokuron
0
190
Swift Attributes
hokuron
0
470
Peek in Calendar implementation of swift-foundation
hokuron
0
250
MVVM
hokuron
0
79
Summon Rust from Swift
hokuron
0
720
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
72
Clean Architecture 2
hokuron
0
90
Other Decks in Programming
See All in Programming
Creating Composable Callables in Contemporary C++
rollbear
0
180
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
130
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
190
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
180
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
270
Vite+ Unified Toolchain for the Web
naokihaba
0
410
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
450
はてなアカウント基盤 State of the Union
cockscomb
1
1.2k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
630
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.6k
どこまでゆるくて許されるのか
tk3fftk
0
290
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
380
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Are puppies a ranking factor?
jonoalderson
1
3.7k
The Language of Interfaces
destraynor
162
27k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
270
KATA
mclloyd
PRO
35
15k
Practical Orchestrator
shlominoach
191
11k
Docker and Python
trallard
47
3.9k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
400
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
310
RailsConf 2023
tenderlove
30
1.5k
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
!