From 9633113da461846a903e634f889eb67c32522060 Mon Sep 17 00:00:00 2001 From: Hieu Vu Date: Sun, 4 Jun 2023 21:59:54 +0700 Subject: [PATCH 1/2] Update data-classes.md --- docs/topics/data-classes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/topics/data-classes.md b/docs/topics/data-classes.md index 8bec9dba2d6..a9598b32a85 100644 --- a/docs/topics/data-classes.md +++ b/docs/topics/data-classes.md @@ -7,6 +7,7 @@ derivable from the data. In Kotlin, these are called _data classes_ and are mark ```kotlin data class User(val name: String, val age: Int) ``` +In case you know for sure that you do not need any benefit of `data class` then using normal `class` is fine. The compiler automatically derives the following members from all properties declared in the primary constructor: From 1296f4fd95de9af9f51272a39723dadd5bb0bfa0 Mon Sep 17 00:00:00 2001 From: Hieu Vu Date: Sun, 4 Jun 2023 22:09:37 +0700 Subject: [PATCH 2/2] Update data-classes.md --- docs/topics/data-classes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/data-classes.md b/docs/topics/data-classes.md index a9598b32a85..2ec16203adf 100644 --- a/docs/topics/data-classes.md +++ b/docs/topics/data-classes.md @@ -7,7 +7,7 @@ derivable from the data. In Kotlin, these are called _data classes_ and are mark ```kotlin data class User(val name: String, val age: Int) ``` -In case you know for sure that you do not need any benefit of `data class` then using normal `class` is fine. +In case you know for sure that you do not need any utility functions of `data class` then using normal `class` is fine. The compiler automatically derives the following members from all properties declared in the primary constructor: