Hi! In what way the following code ``` sealed cl...
# announcements
d
Hi! In what way the following code
Copy code
sealed class Data

class StructuredData : Data()
data class GenericData(val payload: Int) : Data()
is less optimal than following:
Copy code
sealed class Data

object StructuredData : Data()
data class GenericData(val payload: Int) : Data()
I often see
object
used in these situations, was curious what are the pros of this approach. Tighter bytecode?