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
420
Kotlin 1.5 preview
Panini
February 17, 2021
Tweet
Share
More Decks by Panini
See All by Panini
Java谷園から逃げ出した話
panini
0
360
Kotlin 1.4-rc
panini
0
220
Fixing Broken Robots - Android Mutation Testing
panini
0
170
Kotlin Multiplatform
panini
2
620
build.gradle.kts
panini
2
2.3k
Kotlin Multi-platform(?)
panini
1
700
Convert Java file to Kotlin file ⌥⇧⌘K
panini
0
1.1k
Introducing Android P
panini
2
810
Display Cutout
panini
1
600
Other Decks in Programming
See All in Programming
RuboCop: Modularity and AST Insights
koic
2
1.7k
Empowering Developers with HTML-Aware ERB Tooling @ RubyKaigi 2025, Matsuyama, Ehime
marcoroth
2
790
Thank you <💅>, What's the Next?
ahoxa
1
550
파급효과: From AI to Android Development
l2hyunwoo
0
120
PHPバージョンアップから始めるOSSコントリビュート / how2oss-contribute
dmnlk
1
1.1k
大LLM時代にこの先生きのこるには-ITエンジニア編
fumiyakume
7
3.1k
State of Namespace
tagomoris
4
2k
Chrome Extension Techniques from Hell
moznion
1
160
Exit 8 for SwiftUI
ojun9
0
140
ComposeでWebアプリを作る技術
tbsten
0
120
iOSアプリで測る!名古屋駅までの 方向と距離
ryunakayama
0
100
AI時代の開発者評価について
ayumuu
0
200
Featured
See All Featured
Done Done
chrislema
184
16k
Visualization
eitanlees
146
16k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.5k
Unsuck your backbone
ammeep
670
57k
Optimizing for Happiness
mojombo
377
70k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
13
1.4k
The Invisible Side of Design
smashingmag
299
50k
Documentation Writing (for coders)
carmenintech
69
4.7k
A Tale of Four Properties
chriscoyier
158
23k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
A designer walks into a library…
pauljervisheath
205
24k
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!