codeslubber
10/25/2017, 10:51 PMpoohbar
10/26/2017, 12:15 PMDogBuilder
would be used for.codeslubber
10/26/2017, 2:20 PMpoohbar
10/26/2017, 2:24 PMDogBuilder().age(2).name("Spotty");
is just as readable as:
DogBuilder db = new DogBuilder();
db.setAge(2);
db.setName("Spotty");
I value your opinion, what do you think?Paul Woitaschek
10/26/2017, 2:41 PMdata class Dog(val age: Int) {
init {
require(age >= 0) { "Dog isn't born yet" }
}
}
poohbar
10/26/2017, 2:48 PMcodeslubber
10/26/2017, 4:00 PM