https://kotlinlang.org logo
#announcements
Title
# announcements
k

kevinmost

07/25/2017, 3:12 PM
but then maybe my ideal world would have
foo: String
and
foo: mut String
, and no
val
and
var
😛
r

Ruckus

07/25/2017, 5:08 PM
So... Rust? 😉
k

kevinmost

07/25/2017, 5:23 PM
I think Rust got a ton of stuff right. Mutability for sure.
val
and
var
are okay, but the equal lengths means that you're still making a choice every time you declare a variable. IMO all variables should be immutable, and you should only have to make a choice when you choose to make it mutable. And it should be considerably less nice-looking to make a variable mutable so that the intentions are clear 😛 Rust also has interior immutability, which is a huge win IMO, and something that was very well-received during the Kotlin feature request survey, but I don't know if we could ever have that realistically
r

Ruckus

07/25/2017, 5:29 PM
I agree that Rust has tons of things right, but I think many of its immutability guarantees would be impossible to implement on the JVM.
k

kevinmost

07/25/2017, 5:30 PM
yup
2 Views