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
58
Kotlinのデフォルト引数の話
Kyoto.kt #3
で発表した資料です。
taiseiue
May 10, 2025
Tweet
Share
More Decks by taiseiue
See All by taiseiue
“⾞が通れるほど⼤きな”セキュリティーホールを抑えながらログインしたい
taiseiue
0
220
.NETの上でお手製の言語を動かす技術
taiseiue
0
83
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
320
振り向き美人
taiseiue
0
20
Tadpole operators
taiseiue
0
53
(自作の)プログラミング言語ができるまで
taiseiue
1
410
Other Decks in Technology
See All in Technology
ZOZOマッチのアーキテクチャと技術構成
zozotech
PRO
3
1.5k
roppongirb_20250911
igaiga
1
210
ChatGPTとPlantUML/Mermaidによるソフトウェア設計
gowhich501
1
130
実践!カスタムインストラクション&スラッシュコマンド
puku0x
0
370
react-callを使ってダイヤログをいろんなとこで再利用しよう!
shinaps
1
230
オブザーバビリティが広げる AIOps の世界 / The World of AIOps Expanded by Observability
aoto
PRO
0
360
Firestore → Spanner 移行 を成功させた段階的移行プロセス
athug
1
460
ガチな登山用デバイスからこんにちは
halka
1
240
初めてAWSを使うときのセキュリティ覚書〜初心者支部編〜
cmusudakeisuke
1
240
Snowflake Intelligenceにはこうやって立ち向かう!クラシルが考えるAI Readyなデータ基盤と活用のためのDataOps
gappy50
0
140
サラリーマンの小遣いで作るtoCサービス - Cloudflare Workersでスケールする開発戦略
shinaps
2
420
Webブラウザ向け動画配信プレイヤーの 大規模リプレイスから得た知見と学び
yud0uhu
0
230
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
Unsuck your backbone
ammeep
671
58k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Language of Interfaces
destraynor
161
25k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Done Done
chrislema
185
16k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Making Projects Easy
brettharned
117
6.4k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
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 京都産業大学 上村太成