$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Generalized accessors
Search
Takuma Shimizu
March 27, 2019
Programming
0
82
Generalized accessors
Takuma Shimizu
March 27, 2019
Tweet
Share
More Decks by Takuma Shimizu
See All by Takuma Shimizu
Swift Attributes
hokuron
0
440
Peek in Calendar implementation of swift-foundation
hokuron
0
200
MVVM
hokuron
0
51
Summon Rust from Swift
hokuron
0
690
Opaque Result Type in Swift with Rust
hokuron
0
170
Ownership of Swift as seen from iteration and Rust
hokuron
1
690
Clean Architecture 3
hokuron
0
58
Clean Architecture 2
hokuron
0
76
Create MLで犬と猫の肉球を学習
hokuron
0
100
Other Decks in Programming
See All in Programming
Cap'n Webについて
yusukebe
0
130
認証・認可の基本を学ぼう後編
kouyuume
0
180
dotfiles 式年遷宮 令和最新版
masawada
1
750
connect-python: convenient protobuf RPC for Python
anuraaga
0
390
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
3k
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
ID管理機能開発の裏側 高速にSaaS連携を実現したチームのAI活用編
atzzcokek
0
210
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
120
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
1
220
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.3k
チームをチームにするEM
hitode909
0
300
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.6k
Being A Developer After 40
akosma
91
590k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Code Review Best Practice
trishagee
74
19k
The Invisible Side of Design
smashingmag
302
51k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Building Applications with DynamoDB
mza
96
6.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
YesSQL, Process and Tooling at Scale
rocio
174
15k
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
!