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
660
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
840
Display Cutout
panini
1
650
Other Decks in Programming
See All in Programming
React Nativeならぬ"Vue Native"が実現するかも?_新世代マルチプラットフォーム開発フレームワークのLynxとLynxのVue.js対応を追ってみよう_Vue Lynx
yut0naga1_fa
2
1.9k
Blazing Fast UI Development with Compose Hot Reload (droidcon London 2025)
zsmb
0
430
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.6k
Go言語はstack overflowの夢を見るか?
logica0419
0
660
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
500
Pythonに漸進的に型をつける
nealle
1
140
AI時代に必須!状況言語化スキル / ai-context-verbalization
minodriven
2
250
品質ワークショップをやってみた
nealle
0
720
SODA - FACT BOOK(JP)
sodainc
1
9k
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
Introduce Hono CLI
yusukebe
6
3.3k
iOSでSVG画像を扱う
kishikawakatsumi
0
180
Featured
See All Featured
A better future with KSS
kneath
239
18k
BBQ
matthewcrist
89
9.9k
Rails Girls Zürich Keynote
gr2m
95
14k
Context Engineering - Making Every Token Count
addyosmani
8
320
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
KATA
mclloyd
PRO
32
15k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
How GitHub (no longer) Works
holman
315
140k
How to Think Like a Performance Engineer
csswizardry
27
2.2k
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!