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
470
Kotlin 1.5 preview
Panini
February 17, 2021
Tweet
Share
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
750
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
CSC307 Lecture 11
javiergs
PRO
0
580
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
200
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
190
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
850
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
230
TipKitTips
ktcryomm
0
150
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
320
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
100
ぼくの開発環境2026
yuzneri
1
290
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3k
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
130
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
970
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
130
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
97
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
660
Statistics for Hackers
jakevdp
799
230k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
78
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.7k
Building Applications with DynamoDB
mza
96
6.9k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Designing for humans not robots
tammielis
254
26k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
210
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!