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
0
81
Generalized accessors
Takuma Shimizu
March 27, 2019
Tweet
Share
More Decks by Takuma Shimizu
See All by Takuma Shimizu
Swift Attributes
hokuron
0
430
Peek in Calendar implementation of swift-foundation
hokuron
0
190
MVVM
hokuron
0
51
Summon Rust from Swift
hokuron
0
680
Opaque Result Type in Swift with Rust
hokuron
0
160
Ownership of Swift as seen from iteration and Rust
hokuron
1
690
Clean Architecture 3
hokuron
0
54
Clean Architecture 2
hokuron
0
69
Create MLで犬と猫の肉球を学習
hokuron
0
100
Other Decks in Programming
See All in Programming
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
5.9k
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
190
1から理解するWeb Push
dora1998
7
1.9k
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
540
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
11
4.4k
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
170
Cache Me If You Can
ryunen344
2
4k
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
480
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
550
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
310
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
570
Navigating Dependency Injection with Metro
zacsweers
3
3.5k
Featured
See All Featured
Writing Fast Ruby
sferik
628
62k
Docker and Python
trallard
46
3.6k
Facilitating Awesome Meetings
lara
55
6.5k
The Language of Interfaces
destraynor
161
25k
Scaling GitHub
holman
463
140k
Designing for Performance
lara
610
69k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Statistics for Hackers
jakevdp
799
220k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
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
!