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のデフォルト引数の話
Search
taiseiue
May 10, 2025
Technology
0
63
Kotlinのデフォルト引数の話
Kyoto.kt #3
で発表した資料です。
taiseiue
May 10, 2025
Tweet
Share
More Decks by taiseiue
See All by taiseiue
“⾞が通れるほど⼤きな”セキュリティーホールを抑えながらログインしたい
taiseiue
0
250
.NETの上でお手製の言語を動かす技術
taiseiue
0
89
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
350
振り向き美人
taiseiue
0
23
Tadpole operators
taiseiue
0
56
(自作の)プログラミング言語ができるまで
taiseiue
1
470
Other Decks in Technology
See All in Technology
AI連携の新常識! 話題のMCPをはじめて学ぶ!
makoakiba
0
180
アウトプットから始めるOSSコントリビューション 〜eslint-plugin-vueの場合〜 #vuefes
bengo4com
3
1.9k
プレイドのユニークな技術とインターンのリアル
plaidtech
PRO
1
600
東京大学「Agile-X」のFPGA AIデザインハッカソンを制したソニーのAI最適化
sony
0
180
書籍『実践 Apache Iceberg』の歩き方
ishikawa_satoru
0
420
文字列操作の達人になる ~ Kotlinの文字列の便利な世界 ~ - Kotlin fest 2025
tomorrowkey
2
330
AIがコードを書いてくれるなら、新米エンジニアは何をする? / komekaigi2025
nkzn
24
16k
新米エンジニアをTech Leadに任命する ー 成長を支える挑戦的な人と組織のマネジメント
naopr
1
340
JAWS UG AI/ML #32 Amazon BedrockモデルのライフサイクルとEOL対応/How Amazon Bedrock Model Lifecycle Works
quiver
1
590
20251102 WordCamp Kansai 2025
chiilog
0
430
アノテーション作業書作成のGood Practice
cierpa0905
PRO
1
360
現場の壁を乗り越えて、 「計装注入」が拓く オブザーバビリティ / Beyond the Field Barriers: Instrumentation Injection and the Future of Observability
aoto
PRO
1
800
Featured
See All Featured
It's Worth the Effort
3n
187
28k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
191
56k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Designing Experiences People Love
moore
142
24k
Documentation Writing (for coders)
carmenintech
76
5.1k
Testing 201, or: Great Expectations
jmmastey
46
7.7k
Code Reviewing Like a Champion
maltzj
526
40k
The Cost Of JavaScript in 2023
addyosmani
55
9.1k
Building Adaptive Systems
keathley
44
2.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Transcript
Kotlinの デフォルト引数の話 Kyoto.kt#3 2025/5/10 京都産業大学 上村太成
自己紹介 •taiseiue • X @taiseiue • id:taiseiue • taiseiue.jp •
C#/TypeScript/Perl • • JVM界とは無縁
None
None
None
Kotlinの話をします
デフォルト引数
None
None
Javaってデフォルト引数あったっけ
None
これが内部で どうなってるのかを見る
内部を見る
内部を見る jarを解凍する(tar xfみたいな)
内部を見る jarを解凍する(tar xfみたいな) バイトコードを逆アセンブル
None
None
None
None
None
None
None
None
None
0 0 0 0 0 0 1 1 ビットマスク
https://developers-jp.googleblog.com/2020/11/dont-argue-with-default-arguments.html
引数が32個以上の時は?
None
実行してみる
None
None
None
動いてるやん
None
None
まとめ • @JvmOverloads + デフォルト引数を持つ関数 • オーバーロードの関数とfunc$defaultみたいなメソッドに展開される • Func$defaultは引数に、どの引数が指定されてるかを表すフラ グをとる
• これはInt32型 • 32ビットに収まらない場合はもうひとつ引数ができる
None
None
完
Kotlinの デフォルト引数の話 Kyoto.kt#3 2025/5/10 京都産業大学 上村太成