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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Panini
February 17, 2021
Programming
470
1
Share
Kotlin 1.5 preview
Panini
February 17, 2021
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
760
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
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
220
AIと共にエンジニアとPMの “二刀流”を実現する
naruogram
0
110
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.3k
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
160
存在論的プログラミング: 時間と存在を記述する
koriym
5
730
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.5k
OTP を自動で入力する裏技
megabitsenmzq
0
130
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
740
Strategy for Finding a Problem for OSS: With Real Examples
kibitan
0
130
「速くなった気がする」をデータで疑う
senleaf24
0
120
Nuxt Server Components
wattanx
0
230
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
Navigating Weather and Climate Data
rabernat
0
150
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Become a Pro
speakerdeck
PRO
31
5.9k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
260
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
120
KATA
mclloyd
PRO
35
15k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
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!