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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
バイブコーディングで3倍早く⚪⚪を作ってみた
samakada
0
160
Route 53 Global Resolver で高額課金発生!
otanikohei2023
0
130
AI時代における技術的負債への取り組み
codenote
1
1.8k
Revisiting [CLS] and Patch Token Interaction in Vision Transformers
yu4u
0
400
CloudTrail を見つめ直してみる
kazzpapa3
1
120
プラットフォームエンジニアリングの実践 - AWS コンテナサービスで構築する社内プラットフォーム / AWS Containers Platform Meetup #1
literalice
1
210
GKE Agent SandboxでAIが生成したコードを 安全に実行してみた
lamaglama39
0
100
「SaaSの次の時代」に重要性を増すステークホルダーマネジメントの要諦 ~解像度を圧倒的に高めPdMの価値を最大化させる方法~
kakehashi
PRO
3
2.6k
AIコーディング時代における、ソフトウェアサプライチェーン攻撃に対する防衛術(簡易版)
soysoysoyb
0
150
目的ファーストのハーネス設計 ~ハーネスの変更容易性を高めるための優先順位~
gotalab555
8
2.5k
データ定義の混乱と戦う 〜 管理会計と財務会計 〜
wonohe
0
150
Do Ruby::Box dream of Modular Monolith?
joker1007
1
360
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
810
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
740
30 Presentation Tips
portentint
PRO
1
280
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
280
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.9k
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