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
450
Kotlin 1.5 preview
Panini
February 17, 2021
Tweet
Share
More Decks by Panini
See All by Panini
Java谷園から逃げ出した話
panini
0
380
Kotlin 1.4-rc
panini
0
230
Fixing Broken Robots - Android Mutation Testing
panini
0
190
Kotlin Multiplatform
panini
2
650
build.gradle.kts
panini
2
2.4k
Kotlin Multi-platform(?)
panini
1
730
Convert Java file to Kotlin file ⌥⇧⌘K
panini
0
1.1k
Introducing Android P
panini
2
830
Display Cutout
panini
1
640
Other Decks in Programming
See All in Programming
CSC509 Lecture 01
javiergs
PRO
1
440
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
10
6.4k
CSC305 Lecture 01
javiergs
PRO
1
400
そのpreloadは必要?見過ごされたpreloadが技術的負債として爆発した日
mugitti9
2
3.2k
Go Conference 2025: Goで体感するMultipath TCP ― Go 1.24 時代の MPTCP Listener を理解する
takehaya
8
1.6k
階層構造を表現するデータ構造とリファクタリング 〜1年で10倍成長したプロダクトの変化と課題〜
yuhisatoxxx
3
960
私達はmodernize packageに夢を見るか feat. go/analysis, go/ast / Go Conference 2025
kaorumuta
2
520
タスクの特性や不確実性に応じた最適な作業スタイルの選択(ペアプロ・モブプロ・ソロプロ)と実践 / Optimal Work Style Selection: Pair, Mob, or Solo Programming.
honyanya
3
160
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
220
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
790
GitHub Actions × AWS OIDC連携の仕組みと経緯を理解する
ota1022
0
250
CSC305 Lecture 05
javiergs
PRO
0
210
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
51k
Automating Front-end Workflow
addyosmani
1371
200k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
Code Review Best Practice
trishagee
72
19k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
How to Ace a Technical Interview
jacobian
280
24k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
What's in a price? How to price your products and services
michaelherold
246
12k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
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!