yup, immutable data classes are sweet, especially ...
# getting-started
p
yup, immutable data classes are sweet, especially with kotlin's named arguments but they become pain in the a** when using from java where you cant easily use
copy()
😞
a
You could create your own version:
Copy code
class Person(val name: String) {
    val updated = Instant.now()

    @JvmOverloads
    fun copy(name: String = this.name) = Person(name)
}