DEV Community

Discussion on: Kotlin: Removing POJO Boilerplate

Collapse
 
serhuz profile image
Sergei Munovarov • Edited

Why not just move name and age to the class body? This way you get a no-arg constructor by default. And you can use with or apply elsewhere in code when instantiating Person.