$30 off During Our Annual Pro Sale. View Details »
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
240
Fixing Broken Robots - Android Mutation Testing
panini
0
200
Kotlin Multiplatform
panini
2
660
build.gradle.kts
panini
2
2.4k
Kotlin Multi-platform(?)
panini
1
740
Convert Java file to Kotlin file ⌥⇧⌘K
panini
0
1.1k
Introducing Android P
panini
2
840
Display Cutout
panini
1
650
Other Decks in Programming
See All in Programming
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
11
6.8k
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
130
Evolving NEWT’s TypeScript Backend for the AI-Driven Era
xpromx
0
260
TypeScript 5.9 で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
980
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
1
210
目的で駆動する、AI時代のアーキテクチャ設計 / purpose-driven-architecture
minodriven
11
3.9k
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
390
『実践MLOps』から学ぶ DevOps for ML
nsakki55
2
540
tparseでgo testの出力を見やすくする
utgwkk
1
120
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
120
分散DBって何者なんだ... Spannerから学ぶRDBとの違い
iwashi623
0
170
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
24
21k
Featured
See All Featured
BBQ
matthewcrist
89
9.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
The Language of Interfaces
destraynor
162
25k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
700
4 Signs Your Business is Dying
shpigford
186
22k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
For a Future-Friendly Web
brad_frost
180
10k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
The Cult of Friendly URLs
andyhume
79
6.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
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!