# Type modelling in Kotlin

DevFeed: [Type modelling in Kotlin](<https://devfeed.tech/articles/type-modelling-in-kotlin-39389.md>)

Original publisher: [Read original article](<https://kt.academy/article/type-modelling-kotlin>)

Published: 2022-09-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Software](<https://devfeed.tech/topics/software.md>), [Code](<https://devfeed.tech/topics/code.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [class](<https://devfeed.tech/topics/class.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [exception](<https://devfeed.tech/tags/exception.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [software](<https://devfeed.tech/tags/software.md>), [type-safety](<https://devfeed.tech/tags/type-safety.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

## AI overview

This Kotlin tutorial explains how modelling domain concepts with types, including value classes and explicit unit types, can make APIs clearer and prevent incompatible units from compiling together. It also discusses Kotlin's unchecked exceptions and introduces a type-based approach to error handling.

## Source excerpt

Type safety is undervalued in most software projects and causes enormous financial losses throughout the world. Changing a few bad habits can lead to more reliable software.