Kotlin Deep Dive: data class, object, and data object

Kotlin gives us multiple ways to represent data and singletons. Each one — data class, object, and data object — has different semantics…