the real immutability support would be great. i re...
# announcements
c
the real immutability support would be great. i really like that in swift
💯 7
e
Can you elaborate, please? Some Swift example would be really appreciated.
c
In Swift, you can make a class or a struct. The struct is always by value, class by reference.
e
So, does it mean you are really looking for value types?
k
I'm not really sure what the "real immutability support" proposal would even entail in Kotlin, or how it would interop with Java, or anything else, but I voted for it because it's an amazing feature if we could have interior immutability. Rust has interior immutability where you have to pass a mutable reference to be able to do things like push elements into a Vec, while you can use any reference to read an element from it. Again, I question the feasibility of something like that, but it's definitely item #1 on my wishlist
âž• 1
c
sorry guys i totally missed this thread, here’s an explanation with a probably outdated syntax, but you get the idea http://stackoverflow.com/a/28535589