Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
200
Swift Attributes
hokuron
0
480
Peek in Calendar implementation of swift-foundation
hokuron
0
280
MVVM
hokuron
0
86
Summon Rust from Swift
hokuron
0
730
Opaque Result Type in Swift with Rust
hokuron
0
200
Ownership of Swift as seen from iteration and Rust
hokuron
1
750
Clean Architecture 3
hokuron
0
76
Clean Architecture 2
hokuron
0
100
Other Decks in Programming
See All in Programming
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
450
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
530
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.8k
R8 の設定見直しでアプリサイズ削減
andpad
0
190
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.5k
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
160
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
250
残高管理から台帳サービスへの進化
artoy
0
180
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
690
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
140
CodeRabbitの効果検証と過ごしてみた3ヶ月
armondando
0
210
dotNET_vulnclicker_intro.pdf
deka_morita
0
130
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
610
Making the Leap to Tech Lead
cromwellryan
135
10k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Typedesign – Prime Four
hannesfritz
42
3.2k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
300
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.3k
KATA
mclloyd
PRO
35
16k
Un-Boring Meetings
codingconduct
0
450
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
610
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
530
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
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
!