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
73
Kotlinのデフォルト引数の話
Kyoto.kt #3
で発表した資料です。
taiseiue
May 10, 2025
Tweet
Share
More Decks by taiseiue
See All by taiseiue
“⾞が通れるほど⼤きな”セキュリティーホールを抑えながらログインしたい
taiseiue
0
300
.NETの上でお手製の言語を動かす技術
taiseiue
0
93
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
380
振り向き美人
taiseiue
0
24
Tadpole operators
taiseiue
0
65
(自作の)プログラミング言語ができるまで
taiseiue
1
530
Other Decks in Technology
See All in Technology
MariaDB Connector/C のcaching_sha2_passwordプラグインの仕様について
boro1234
0
1.1k
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
450
[PR] はじめてのデジタルアイデンティティという本を書きました
ritou
0
370
フィッシュボウルのやり方 / How to do a fishbowl
pauli
2
430
株式会社ビザスク_AI__Engineering_Summit_Tokyo_2025_登壇資料.pdf
eikohashiba
1
140
Kiro を用いたペアプロのススメ
taikis
4
2.1k
アラフォーおじさん、はじめてre:Inventに行く / A 40-Something Guy’s First re:Invent Adventure
kaminashi
0
190
Knowledge Work の AI Backend
kworkdev
PRO
0
340
Keynoteから見るAWSの頭の中
nrinetcom
PRO
1
150
Cloud WAN MCP Serverから考える新しいネットワーク運用 / 20251228 Masaki Okuda
shift_evolve
PRO
0
130
[Data & AI Summit '25 Fall] AIでデータ活用を進化させる!Google Cloudで作るデータ活用の未来
kirimaru
0
4.1k
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
600
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
79
Discover your Explorer Soul
emna__ayadi
2
1k
Writing Fast Ruby
sferik
630
62k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
190
Crafting Experiences
bethany
0
24
Building Flexible Design Systems
yeseniaperezcruz
330
39k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
0
100
A Tale of Four Properties
chriscoyier
162
23k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
410
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 京都産業大学 上村太成