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
Kotlin Dynamic type
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
coe
September 26, 2023
Technology
430
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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.6k
About HealthKit nutrition
coe
0
500
iOSDC 2023 Web in tvOS and watchOS
coe
1
1.1k
iOSDC 2023 Push To Talk
coe
1
2.8k
iOSDC手で触れずにアプリを動かす技術
coe
1
2.4k
iOSDC令和時代のXML処理を考える
coe
3
3.3k
iOSDC 2021 Restore
coe
6
2.4k
詳解Storyboard
coe
7
4.2k
あなたの知らない連絡先の世界
coe
15
8.4k
Other Decks in Technology
See All in Technology
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
530
営業オントロジーの作り方と、エージェントからの辿り方 ── ナレッジワークの現場から
kworkdev
PRO
1
270
『GOエコノミー 』(相乗りサービス) におけるスペック駆動開発
mot_techtalk
1
310
HacobuにおけるFDEとは/登壇資料(戸井田 裕貴)
hacobu
PRO
1
780
Snapshot Testing in Practice: Predictable and Reliable SwiftUI Views
fespinoza
0
120
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
520
[2026 Oracle Technical Deep Dive] Apache Iceberg × Oracle AI Database -Oracle Autonomous AI Lakehouseが実現するAI時代のデータ基盤- (2026年9月17日開催)
oracle4engineer
PRO
0
110
形式手法を使って仕様をコーディングしよう
mikanichinose
0
180
LLM機能を自作して分かるSnowflake Cortex AIの強み
nayuts
0
290
BedrockとLambdaで作る リアルタイム進行型推理ゲーム
kawametho
0
190
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
210
ファミコンでPHPを動かす / PHP on the Famicom side b
tomzoh
0
130
Featured
See All Featured
Leo the Paperboy
mayatellez
10
2.3k
Scaling GitHub
holman
464
140k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
790
Become a Pro
speakerdeck
PRO
31
6.3k
Being A Developer After 40
akosma
91
590k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
460
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
690
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
420
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
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