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
階層構造を表現するデータ構造とリファクタリング 〜1年で10倍成長したプロダクトの変化と課題〜
yuhisatoxxx
3
920
Back to the Future: Let me tell you about the ACP protocol
terhechte
0
130
Web フロントエンドエンジニアに開かれる AI Agent プロダクト開発 - Vercel AI SDK を観察して AI Agent と仲良くなろう! #FEC余熱NIGHT
izumin5210
3
410
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
150
Web技術を最大限活用してRAW画像を現像する / Developing RAW Images on the Web
ssssota
2
1.2k
AIで開発生産性を上げる個人とチームの取り組み
taniigo
0
130
ソフトウェア設計の実践的な考え方
masuda220
PRO
3
490
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
600
CSC509 Lecture 01
javiergs
PRO
1
430
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
140
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
180
プログラマのための作曲入門
cheebow
0
540
Featured
See All Featured
Visualization
eitanlees
148
16k
Thoughts on Productivity
jonyablonski
70
4.9k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Bash Introduction
62gerente
615
210k
The Cost Of JavaScript in 2023
addyosmani
53
9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
Embracing the Ebb and Flow
colly
88
4.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
A Modern Web Designer's Workflow
chriscoyier
697
190k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Git: the NoSQL Database
bkeepers
PRO
431
66k
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!