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
Generative Programming in Swift
Search
Shintaro Kaneko
August 20, 2016
Programming
4.7k
1
Share
Generative Programming in Swift
JSON Schema + APIKit Generator
https://github.com/kaneshin/genkit
Shintaro Kaneko
August 20, 2016
More Decks by Shintaro Kaneko
See All by Shintaro Kaneko
How to keep growing SRE team at Eureka
kaneshin
3
9.7k
Go - CLI Tools Design
kaneshin
0
7k
Summer Internship 2018 - The principle of the eureka summer internship 2018
kaneshin
2
130
Summer Internship 2018 - The eureka summer internship 2018
kaneshin
0
140
Summer Internship 2018 - How to develop a product
kaneshin
0
120
How to write Go code
kaneshin
8
8.4k
Go Package Guidelines
kaneshin
1
1.2k
net/http package ~GoConference 2017 Spring~
kaneshin
1
3k
Essentials of Golang
kaneshin
5
14k
Other Decks in Programming
See All in Programming
書き換えて学ぶTemporal #fukts
pirosikick
2
360
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
140
空間オーディオの活用
objectiveaudio
0
140
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
380
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
350
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
180
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
230
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
770
Kingdom of the Machine
yui_knk
2
1.5k
AIと共に生きる技術選定 2026
sgash708
0
130
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
500
ハーネスエンジニアリングとは?
kinopeee
13
6.9k
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
230
The browser strikes back
jonoalderson
0
1k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
340
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Building Applications with DynamoDB
mza
96
7k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
170
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
280
Amusing Abliteration
ianozsvald
1
160
Transcript
Generative Programming in Swift Presented by @kaneshin 08/20/2016 iOSDC
@kaneshin (Shintaro Kaneko) - Principal Engineer / Manager - Gopher,
Vimmer, Photographer, Mathematician
None
Unleashing the real power of Core Data with the elegance
and safety of Swift
ੜతϓϩάϥϛϯά Generative Programming
࣮ફ͍ͯ͠Δਓ
Generative Programming - Generics struct Something<T> { let with: T
}
Generative Programming - Generics struct Something<T> { let with: T
}
࣮ફ͍ͯ͠Δਓ
ੜతϓϩάϥϛϯά ͱʁ
ੜతϓϩάϥϛϯά: Generative programming δΣωϦοΫͳΫϥεɺϓϩτλΠϓϕʔεɺςϯϓϨʔτɺΞε ϖΫτɺίʔυੜͳͲͷٕ๏Λͬͯιʔείʔυ࡞ΛࣗಈԽ ͠ɺϓϩάϥϚͷੜ࢈ੑΛ্ͤ͞ΔϓϩάϥϛϯάͷελΠϧͰ ͋Δɻ ιϑτΣΞίϯϙʔωϯτͳͲͷίʔυ࠶ར༻ͷٕ๏ͱ࿈ܞ͠ ͯ༻͞ΕΔɻ
ੜతϓϩάϥϛϯά: Generative programming δΣωϦοΫͳΫϥεɺϓϩτλΠϓϕʔεɺςϯϓϨʔτɺΞε ϖΫτɺίʔυੜͳͲͷٕ๏Λͬͯιʔείʔυ࡞ΛࣗಈԽ ͠ɺϓϩάϥϚͷੜ࢈ੑΛ্ͤ͞ΔϓϩάϥϛϯάͷελΠϧͰ ͋Δɻ ιϑτΣΞίϯϙʔωϯτͳͲͷίʔυ࠶ར༻ͷٕ๏ͱ࿈ܞ͠ ͯ༻͞ΕΔɻ δΣωϦΫεϓϩάϥϛϯά
ੜతϓϩάϥϛϯάͷҰछ
Generics Programming
"Dynamic, highly parameterized software is harder to understand and build
than more static software." (Gang of Four 1995:21)
Generics are a trade off between programmer time, compilation time,
and execution time. See https://github.com/golang/proposal/blob/master/design/15292-generics.md
ੜతϓϩάϥϛϯά: Generative programming δΣωϦοΫͳΫϥεɺϓϩτλΠϓϕʔεɺςϯϓϨʔτɺΞε ϖΫτɺίʔυੜͳͲͷٕ๏Λͬͯιʔείʔυ࡞ΛࣗಈԽ ͠ɺϓϩάϥϚͷੜ࢈ੑΛ্ͤ͞ΔϓϩάϥϛϯάͷελΠϧͰ ͋Δɻ ιϑτΣΞίϯϙʔωϯτͳͲͷίʔυ࠶ར༻ͷٕ๏ͱ࿈ܞ͠ ͯ༻͞ΕΔɻ
Code Generation
JSON Hyper Schema + HTTP Request
JSON Hyper Schema Swagger prmd
HTTP Request Alamofire APIKit
Code Generation • Demo (If enough time to introduce) •
https://github.com/kaneshin/genkit (golang, ver. 0.0.1) • JSON Hyper Schema - prmd • HTTP Request - APIKit
Thank you Credit: NASA Earth Observatory/NOAA NGDC