6

From Inline to Value Classes

 3 years ago
source link: https://www.youtube.com/watch?v=LpqvtgibbsQ
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
#Kotlin #release

From Inline to Value Classes

2,938 views
•Apr 24, 2021

This video covers one of the main features of the #Kotlin​ 1.5.0 #release​: inline value classes. Inline classes wrap values without any additional overhead. They have been present in the language as an experimental feature since Kotlin 1.2.30, and Kotlin 1.5.0 stabilizes this functionality and makes some improvements.

00:00​ Inline value class 00:40​ Example: Duration 03:17​ Inline value classes in stdlib 05:18​ Defining inline value classes 07:07​ Under the hood: eliminating boxing only when possible [Slide: Under the hood] 07:57​ Under the hood: mangling function names [Slide: mangling function names] 10:05​ From ‘inline’ class to ‘value’ class 10:58​ More resources

Inline Classes Documentation - https://kotlinlang.org/docs/inline-cl...

Visit Kotlin website - https://kotlinlang.org/​ Kotlin Documentation - https://kotlinlang.org/docs/home.html

Check out our blog - https://blog.jetbrains.com/kotlin/​ Subscribe to our Twitter - https://twitter.com/kotlin


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK