not a fan of init personally, you equally do this ...
# getting-started
s
not a fan of init personally, you equally do this (but each to their own)
Copy code
class Human(age : Int) {

    val age : Int = age.takeIf { it  > 0 } ?: throw Error("age no old enough")

}