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
60
Kotlinのデフォルト引数の話
Kyoto.kt #3
で発表した資料です。
taiseiue
May 10, 2025
Tweet
Share
More Decks by taiseiue
See All by taiseiue
“⾞が通れるほど⼤きな”セキュリティーホールを抑えながらログインしたい
taiseiue
0
220
.NETの上でお手製の言語を動かす技術
taiseiue
0
86
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
330
振り向き美人
taiseiue
0
21
Tadpole operators
taiseiue
0
54
(自作の)プログラミング言語ができるまで
taiseiue
1
420
Other Decks in Technology
See All in Technology
C# 14 / .NET 10 の新機能 (RC 1 時点)
nenonaninu
1
680
AIを導⼊しても、 開発⽣産性は"爆増"していない なぜ?
kinosuke01
4
3.1k
stupid jj tricks
indirect
0
930
開発用LLMインフラをVSCode内で完結させる
ueponx
1
230
RailsのPostgreSQL 18対応
yahonda
0
490
Rust In Python
lycorptech_jp
PRO
3
320
Pythonによる契約プログラミング入門 / PyCon JP 2025
7pairs
2
270
PacketProxyで探るGemini CLIのコンテキストエンジニアリング 〜AIエージェントを信頼できる相棒に〜
kakira9618
0
620
5年間のFintech × Rails実践に学ぶ - 基本に忠実な運用で築く高信頼性システム / 5 Years Fintech Rails Retrospective
ohbarye
5
1.7k
高セキュリティ要件を満たすためのiOSアプリ開発:MASVS v2.0.0対応から学ぶ実践知見
antony_kambara
0
370
Windows 11 version 25H2 への準備はできていますか?
tamaiyutaro
1
160
品質保証に注目したAIプロダクト開発
sansantech
PRO
1
150
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1371
200k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Code Reviewing Like a Champion
maltzj
525
40k
We Have a Design System, Now What?
morganepeng
53
7.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
600
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
GraphQLとの向き合い方2022年版
quramy
49
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
550
Producing Creativity
orderedlist
PRO
347
40k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Done Done
chrislema
185
16k
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 京都産業大学 上村太成