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
Kotlin Dynamic type
Search
coe
September 26, 2023
Technology
400
0
Share
Kotlin Dynamic type
集まれSwift好き!Swift愛好会 vol.77 @ DeNA
2023/09/26
coe
September 26, 2023
More Decks by coe
See All by coe
すべてのヘルスケアデータを紐解く.pdf
coe
0
3.4k
About HealthKit nutrition
coe
0
470
iOSDC 2023 Web in tvOS and watchOS
coe
1
1k
iOSDC 2023 Push To Talk
coe
1
2.6k
iOSDC手で触れずにアプリを動かす技術
coe
1
2.2k
iOSDC令和時代のXML処理を考える
coe
3
3k
iOSDC 2021 Restore
coe
6
2.3k
詳解Storyboard
coe
7
4k
あなたの知らない連絡先の世界
coe
15
8.4k
Other Decks in Technology
See All in Technology
AI時代 に増える データ活用先
takahal
0
340
AgentCore×VPCでの設計パターンn選と勘所
har1101
4
340
PyCon JPに学ぶ『決め方の決め方』: TechLead Conference 2026
terapyon
1
200
『生成AI時代のクレデンシャルとパーミッション設計 — Claude Code を起点に』の執筆企画
takuros
1
890
ハーネスエンジニアリングをやりすぎた話 ~そのハーネスは解体された~
gotalab555
5
1.9k
ハーネスエンジニアリングの概要と設計思想
sergicalsix
9
6.1k
Choose your own adventure in agentic design patterns
glaforge
0
160
Angular Architecture Revisited Modernizing Angular Architectural Patterns
rainerhahnekamp
0
100
Scovilleモバイルエンジニア募集中.pdf
julienrudin
0
130
FessのAI検索モード:検索システムとLLMへの取り組み
marevol
0
110
弁護士ドットコム株式会社 エンジニア職向け 会社紹介資料
bengo4com
1
200
Oracle Cloud Infrastructure:2026年4月度サービス・アップデート
oracle4engineer
PRO
0
150
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
6.8k
Prompt Engineering for Job Search
mfonobong
0
280
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
520
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
680
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
130
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
520
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
4 Signs Your Business is Dying
shpigford
187
22k
The Curse of the Amulet
leimatthew05
1
12k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
170
Transcript
ڧ݄ %ZOBNJDUZQF ू·Ε4XJGU͖ʂ4XJGUѪձWPM ू·Ε,PUMJO͖ʂ,PUMJOѪձWPM!%F/"
w ڧ w J04ΤϯδχΞ
%ZOBNJDUZQF
w ڧ w J04Τ ϯδχ Ξ
%ZOBNJD UZQF
fun dynamicFun(x: dynamic): Unit { val dyn: dynamic = ...
} ,PUMJO%ZOBNJDUZQF
%ZOBNJDUZQF
%ZOBNJDUZQF w EZOBNJDܕ w WBMEZOEZOBNJDʜ w ͳΜͰೖΔ
fun dynamicFun(x: dynamic): Unit { }
fun dynamicFun(x: dynamic): Unit { } fun anyFun(x: Any): Unit
{ }
fun dynamicFun(x: dynamic): Unit { x.god } fun anyFun(x: Any):
Unit { x.god // ←ίϯύΠϧΤϥʔ }
%ZOBNJDUZQF w EZOBNJDܕ w WBMEZOEZOBNJDʜ w ͳΜͰೖΔ w ܕνΣοΫΛߦΘͳ͍ʢίϯύΠϧΤϥʔʹͳΒͳ͍ʣ
// xHuman fun dynamicFun(x: dynamic): Unit { x.back.left.left.up.scratch() } class
Back { val left: Back get() = Back() val right: Back get() = Back() val up: Back get() = Back() val down: Back get() = Back() fun scratch(): Unit { println(“ຬʂ”) } } class Human { val back = Back() }
%ZOBNJDUZQF w EZOBNJDܕ w WBMEZOEZOBNJDʜ w ͳΜͰೖΔ w ܕνΣοΫΛߦΘͳ͍ʢίϯύΠϧΤϥʔʹͳΒͳ͍ʣ w
ࣗ༝ʹϓϩύςΟؔΛݺΔ w EZOBNJDܕͷϓϩύςΟؔͷϦλʔϯEZOBNJDܕ
fun dynamicPlus(x: dynamic, y: dynamic): Unit { x + y
}
fun dynamicPlus(x: dynamic, y: dynamic): Unit { x + y
// 3 } dynamicPlus(1, 2)
fun dynamicPlus(x: dynamic, y: dynamic): Unit { x + y
// ڧ } dynamicPlus(“”, “ڧ”)
fun dynamicPlus(x: dynamic, y: dynamic): Unit { x + y
// iOSΤϯδχΞ } dynamicPlus(“iOS”, “ΤϯδχΞ”)
fun dynamicPlus(x: dynamic, y: dynamic): Unit { x + y
// 105ΤϯδχΞ } dynamicPlus(105, “ΤϯδχΞ”)
%ZOBNJDUZQF w EZOBNJDܕ w WBMEZOEZOBNJDʜ w ͳΜͰೖΔ w ܕνΣοΫߦΘͳ͍ʢίϯύΠϧΤϥʔʹͳΒͳ͍ʣ w
ࣗ༝ʹϓϩύςΟؔΛݺΔ w EZOBNJDܕͷϓϩύςΟEZOBNJDܕ w EZOBNJDಉ࢜ͷܭࢉՄೳ
͍͢͝ʂ
͡ΊΑ͏
,PUMJO+4
IUUQTLPUMJOMBOHPSHEPDTEZOBNJDUZQFIUNM %ZOBNJDUZQF
None