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
410
Kotlin 1.5 preview
Panini
February 17, 2021
Tweet
Share
More Decks by Panini
See All by Panini
Java谷園から逃げ出した話
panini
0
350
Kotlin 1.4-rc
panini
0
210
Fixing Broken Robots - Android Mutation Testing
panini
0
160
Kotlin Multiplatform
panini
2
610
build.gradle.kts
panini
2
2.3k
Kotlin Multi-platform(?)
panini
1
690
Convert Java file to Kotlin file ⌥⇧⌘K
panini
0
1.1k
Introducing Android P
panini
2
790
Display Cutout
panini
1
570
Other Decks in Programming
See All in Programming
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
630
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
150
時計仕掛けのCompose
mkeeda
1
200
定理証明プラットフォーム lapisla.net
abap34
1
670
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
8
1.3k
サーバーゆる勉強会 DBMS の仕組み編
kj455
1
360
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
260
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
1
500
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
0
130
盆栽転じて家具となる / Bonsai and Furnitures
aereal
0
2.2k
はてなにおけるfujiwara-wareの活用やecspressoのCI/CD構成 / Fujiwara Tech Conference 2025
cohalz
3
3.2k
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
89
5.8k
For a Future-Friendly Web
brad_frost
176
9.5k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
Typedesign – Prime Four
hannesfritz
40
2.5k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
380
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!