Are enums always 'frozen' after creation? Is there...
# kotlin-native
v
Are enums always 'frozen' after creation? Is there any way around that?
d
Why do you want enums to not be frozen?
1
b
Enums cases are statically allocated anyway, so mutating one (if you could) would be mutating a global essentially. If you want this, might as well make a data class that wraps the enum and carries with it whatever you want to mutate
1
v
It's not a big deal. It's semantically a little cleaner if I could (I wanted to add a mutable list to my enum, and it would be a challenge to do it all in the constructor) but I can work around it.