DEV Community


Discussion on: Kotlin: Removing POJO Boilerplate

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.

Forem Open with the Forem app