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
240
.NETの上でお手製の言語を動かす技術
taiseiue
0
88
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
340
振り向き美人
taiseiue
0
22
Tadpole operators
taiseiue
0
54
(自作の)プログラミング言語ができるまで
taiseiue
1
450
Other Decks in Technology
See All in Technology
ガバメントクラウドの概要と自治体事例(名古屋市)
techniczna
3
240
AgentCon Accra: Ctrl + Alt + Assist: AI Agents Edition
bethany
0
110
Introdução a Service Mesh usando o Istio
aeciopires
0
200
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
WEBサービスを成り立たせるAWSサービス
takano0131
1
180
AWS Control Tower に学ぶ! IAM Identity Center 権限設計の第一歩 / IAM Identity Center with Control Tower
y___u
1
200
Dylib Hijacking on macOS: Dead or Alive?
patrickwardle
0
240
なぜAWSを活かしきれないのか?技術と組織への処方箋
nrinetcom
PRO
5
970
初めてのDatabricks Apps開発
taka_aki
1
110
"プロポーザルってなんか怖そう"という境界を超えてみた@TSUDOI by giftee Tech #1
shilo113
0
200
AI Agent Dojo #2 watsonx Orchestrateフローの作成
oniak3ibm
PRO
0
130
OAuthからOIDCへ ― 認可の仕組みが認証に拡張されるまで
yamatai1212
0
130
Featured
See All Featured
A designer walks into a library…
pauljervisheath
209
24k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Thoughts on Productivity
jonyablonski
70
4.9k
Side Projects
sachag
455
43k
The Language of Interfaces
destraynor
162
25k
What's in a price? How to price your products and services
michaelherold
246
12k
Embracing the Ebb and Flow
colly
88
4.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
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 京都産業大学 上村太成