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 1.5 preview
Search
Panini
February 17, 2021
Programming
1
470
Kotlin 1.5 preview
Panini
February 17, 2021
Tweet
Share
More Decks by Panini
See All by Panini
Java谷園から逃げ出した話
panini
0
400
Kotlin 1.4-rc
panini
0
250
Fixing Broken Robots - Android Mutation Testing
panini
0
210
Kotlin Multiplatform
panini
2
680
build.gradle.kts
panini
2
2.4k
Kotlin Multi-platform(?)
panini
1
750
Convert Java file to Kotlin file ⌥⇧⌘K
panini
0
1.1k
Introducing Android P
panini
2
850
Display Cutout
panini
1
670
Other Decks in Programming
See All in Programming
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
140
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
190
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
170
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
120
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
220
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
200
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
410
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
140
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
370
CSC307 Lecture 15
javiergs
PRO
0
240
Docコメントで始める簡単ガードレール
keisukeikeda
1
110
Featured
See All Featured
From π to Pie charts
rasagy
0
150
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Code Reviewing Like a Champion
maltzj
528
40k
AI: The stuff that nobody shows you
jnunemaker
PRO
3
370
Done Done
chrislema
186
16k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
270
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
140
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Transcript
Kotlin 1.5 preview Kotlin愛好会 vol.27
About Me • Matthew Vern / Panini • Twitter: @panini_ja
Github: panpanini • Mercari, Inc • Android Engineer (US) • Kotlin可愛い
Summary • Sealed Class improvements • Sealed Interface • Reference:
https://zsmb.co/sealed-goodies-coming-in-kotlin-1-5/
Sealed Class improvements
Kotlin ~1.4 Sealed Class • https://kotlinlang.org/docs/sealed-classes.html • Enum with super
power • Can be defined either nested, or in the same file • https://qiita.com/kikuchy/items/ad89a12029082be8d218
Kotlin ~1.4 Sealed Class
Kotlin ~1.4 Sealed Class
Kotlin ~1.4 Sealed Class
Kotlin 1.5+ Sealed Class • https://kotlinlang.org/docs/sealed-classes.html • Can be defined
anywhere in the same package, and same module
Sealed Interface
Kotlin 1.5+ Sealed Interface • https://kotlinlang.org/docs/sealed-classes.html#sealed-interfaces • Implementations must be
declared in same package and same module • Can restrict implementers to inside a single module ◦ Useful for hiding implementation details • YouTrack: https://youtrack.jetbrains.com/issue/KT-22286
Summary • Sealed Class is like super enum • Sealed
Interface is like package private Interface • Kotlin 1.5 looks good!
Have a nice Kotlin!