Kotlin Inline Classes – How they work and when you should use them
Kotlin Inline Classes - How they work and when you should use them Kotlin introduced inline classes with version 1.3 as an experimental feature. You should be aware that their implementation can still change in future releases, but it's already a great time to learn about them now. Inline classes add a simple tool we can use to wrap some other type without adding runtime overhead through additional heap allocations. In this article, we want to see how inline classes in Kotlin work and when it makes sense to use them. Enable inline classes in your project To enable inline classes in your project, you simply need to work with Kotlin version > 1.3 which adds the inline keyword to the language. Since inline classes are still experimental, your IDE…