# An Introduction to Inline Classes

DevFeed: [An Introduction to Inline Classes](<https://devfeed.tech/articles/an-introduction-to-inline-classes-25039.md>)

Original publisher: [Read original article](<https://typealias.com/guides/introduction-to-inline-classes/>)

Author: author@typealias.com (Dave Leeds)

Published: 2018-08-28T05:00:01Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Cloud](<https://devfeed.tech/topics/cloud.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>)

## AI overview

This tutorial introduces Kotlin inline classes, explaining what they are, how they work, and the trade-offs involved. It shows how strong types can help the compiler enforce units such as days, hours, minutes, seconds, or milliseconds while retaining performance.

## Source excerpt

Whether you're writing massive data-chomping processes that run in the cloud, or mobile apps that run on low-powered cell phones, most of us want our code to run fast. And now, Kotlin's inline classes feature allows us to create the data types that we want without giving up the performance that we need! In this series, we're going to take a look at inline classes from top to bottom! This article explores what they are, how they work, and the trade-offs involved when choosing to use them.