allan.conda
06/18/2020, 4:48 AMenum
in Kotlin 1️⃣, or do you just use sealed class
for everything 2️⃣? Is there a disadvantage from using sealed classes?itnoles
06/18/2020, 4:59 AMMilan Hruban
06/18/2020, 5:07 AMallan.conda
06/18/2020, 5:14 AMwhat is your purpose to use it for?my question is essentialy about when to use them, so no specific purpose
If enum is enough (e.g. you don’t need state), you should use enumI see, although I could still use sealed class with only objects; are you suggesting this because it’s more lightweight and idiomatic? My thoughts right now is if sealed classes are a more flexible version of enum, might as well use it every time so I don’t have to refactor it.
itnoles
06/18/2020, 5:17 AMserebit
06/18/2020, 5:48 AMserebit
06/18/2020, 5:48 AMallan.conda
06/18/2020, 6:59 AMStefan Beyer
06/18/2020, 9:26 AMB Chandrasaimohan
02/10/2023, 1:14 PM