KotlinConf’23 — Dissecting Kotlin: Unsealing the Sealed, the SAM, and Other Syntax by Huyen Tue Dao

Matthew Dolan
2 min readApr 14, 2023

--

I had the pleasure of attending the fascinating talk by Huyen Tue Dao at KotlinConf’23 where she explored the question of idomatic Kotlin code. While the conclusion that “it matters what is best for you” might seem slightly disappointing, the journey to that conclusion was both informative and enlightening.

What code is best to solve your problem?

One of the highlights of the talk for me was when the speaker delved into the internals of Kotlin and showed us the byte code. This helped to demystify some of the more advanced concepts and made the talk feel very practical and grounded in real-world examples.

The speaker started by discussing sealed classes and interfaces, and went on to cover several other interesting Kotlin features. These included unsigned integers, which are useful for representing values that need to use the full bit-width, such as color codes in ARGB format. Exploring the byte-code for unsigned types lead us to a discussion on value classes and their usefulness for maintaining the identity of a class even when the underlying value is primitive.

You can find my thoughts on more KotlinConf’23 talks at KotlinConf’23. Please let me know your thoughts.

Join medium to read all of my articles or subscribe for e-mail updates.

--

--

Matthew Dolan

Matt Dolan has been eating doughnuts and developing with Android since the dark days of v1.6.