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
80
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
740
Clean Architecture 3
hokuron
0
72
Clean Architecture 2
hokuron
0
90
Other Decks in Programming
See All in Programming
AIエージェントで 変わるAndroid開発環境
takahirom
2
730
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
130
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
110
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
140
[RVD26] Vibe Architecture en 2040 : Darwin a-t-il (enfin) eu raison des architectes ?
alexandretouret
0
110
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
250
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
140
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
150
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.4k
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
9
3.6k
えっ!!コードを読まずに開発を!?
hananouchi
0
270
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
130
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
460
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
220
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Mobile First: as difficult as doing things right
swwweet
225
10k
Chasing Engaging Ingredients in Design
codingconduct
0
240
Navigating Team Friction
lara
192
16k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.7k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
430
Evolving SEO for Evolving Search Engines
ryanjones
0
250
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
!