Hi guys, I think data classes should have builders...
# language-proposals
n
Hi guys, I think data classes should have builders generated automatically. Here are two ideas for the syntax that I've come up with, any feedback?
Copy code
Person.new { // or 'of', 'create', 'build', etc.
  name = "John"
  age = 23
}
Copy code
Person.new {
   override val name = "John"
   override val age = 23
}
The thread is over here, if you want to take a look: https://discuss.kotlinlang.org/t/automatically-generating-type-safe-builders-for-data-classes/
😕 1