Hey guys, style-wise, do you think there is anythi...
# codereview
a
Hey guys, style-wise, do you think there is anything “wrong” with a secondary copy-constructor, like:
Copy code
class Person {

  constructor(id: Int, name: String)  

  constructor(person: Person) : this(person.id, person.name)

}
or would it be “more kotlin-like” to do something like a
fun copy() = Person(id, name)
method?
a
I am not talking about data classes, this is a regular class, and I also am implementing deep copying of lists, which seems to not be consistent with .copy() from data class
c
my preference would be to have a
fun copy()
but only because I enjoy
class Clazz(val fields: Int, val that: Boolean, val go: String, val here: Short)