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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Panini
February 17, 2021
Programming
490
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kotlin 1.5 preview
Panini
February 17, 2021
More Decks by Panini
See All by Panini
Java谷園から逃げ出した話
panini
0
410
Kotlin 1.4-rc
panini
0
250
Fixing Broken Robots - Android Mutation Testing
panini
0
220
Kotlin Multiplatform
panini
2
710
build.gradle.kts
panini
2
2.5k
Kotlin Multi-platform(?)
panini
1
790
Convert Java file to Kotlin file ⌥⇧⌘K
panini
0
1.2k
Introducing Android P
panini
2
880
Display Cutout
panini
1
690
Other Decks in Programming
See All in Programming
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
420
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
660
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
130
FDEとは、何者なのか?
masapyon1212
0
130
Press start. Python's next generation.
willingc
PRO
3
300
Oxlintはいいぞ(続)
yug1224
1
540
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
260
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
1
460
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
130
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
230
Foundry Localでエージェント開発
seosoft
0
120
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
300
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Faster Mobile Websites
deanohume
310
32k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
Agile that works and the tools we love
rasmusluckow
331
22k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
920
Discover your Explorer Soul
emna__ayadi
2
1.3k
エンジニアに許された特別な時間の終わり
watany
108
250k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
440
Designing for humans not robots
tammielis
254
26k
How to Talk to Developers About Accessibility
jct
2
540
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!