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
80
Generalized accessors
Takuma Shimizu
March 27, 2019
Tweet
Share
More Decks by Takuma Shimizu
See All by Takuma Shimizu
Swift Attributes
hokuron
0
410
Peek in Calendar implementation of swift-foundation
hokuron
0
180
MVVM
hokuron
0
48
Summon Rust from Swift
hokuron
0
670
Opaque Result Type in Swift with Rust
hokuron
0
160
Ownership of Swift as seen from iteration and Rust
hokuron
1
670
Clean Architecture 3
hokuron
0
53
Clean Architecture 2
hokuron
0
67
Create MLで犬と猫の肉球を学習
hokuron
0
99
Other Decks in Programming
See All in Programming
ワンバイナリWebサービスのススメ
mackee
10
7.7k
SODA - FACT BOOK
sodainc
1
960
Java on Azure で LangGraph!
kohei3110
0
140
Gleamという選択肢
comamoca
6
720
レガシーシステムの機能調査・開発におけるAI利活用
takuya_ohtonari
0
600
生成AIで日々のエラー調査を進めたい
yuyaabo
0
590
単体テストの始め方/作り方
toms74209200
0
470
複数アプリケーションを育てていくための共通化戦略
irof
10
3.9k
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
360
Haskell でアルゴリズムを抽象化する / 関数型言語で競技プログラミング
naoya
17
4.7k
Prism.parseで 300本以上あるエンドポイントに 接続できる権限の一覧表を作ってみた
hatsu38
1
110
Using AI Tools Around Software Development
inouehi
0
1.2k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Practical Orchestrator
shlominoach
188
11k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
What's in a price? How to price your products and services
michaelherold
245
12k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
Docker and Python
trallard
44
3.4k
We Have a Design System, Now What?
morganepeng
52
7.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
930
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.9k
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
!