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
93
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
260
MVVM
hokuron
0
82
Summon Rust from Swift
hokuron
0
720
Opaque Result Type in Swift with Rust
hokuron
0
190
Ownership of Swift as seen from iteration and Rust
hokuron
1
740
Clean Architecture 3
hokuron
0
76
Clean Architecture 2
hokuron
0
95
Other Decks in Programming
See All in Programming
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
150
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
220
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
690
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
4.5k
Google Apps Script で Ruby を動かす
kawahara
0
240
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.8k
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
500
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
460
Cloudflare is Agents
chimame
0
170
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
120
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
210
Flow は今どうなっているか
mizdra
PRO
0
580
Featured
See All Featured
Music & Morning Musume
bryan
47
7.3k
How GitHub (no longer) Works
holman
316
150k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
210
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Bash Introduction
62gerente
615
220k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Producing Creativity
orderedlist
PRO
348
40k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Side Projects
sachag
455
43k
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
!