Currently Kotlin's data classes have `copy()` whic...
# stdlib
d
Currently Kotlin's data classes have
copy()
which isn't smart 🙂
Copy code
data class Value(val v: Int)

val v1 = Value(1)
val v2 = v1.copy(v = 1)
println(v1 === v2) // prints 'false'
I wonder if it will be ever possible to have above code to print
true
? To reduce unneeded allocations when data class is immutable? Or will this be something not in core language, but in stdlib?