Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why do you think copy methods are "presumably wrong and misguided"?

For the rest, I agree that in 99% of the cases inheritance and mutability are not needed if you're using greenfield Kotlin libraries. But they are unfortunately often necessary in the Java world.

Mutable data classes are especially quite useful for reducing boilerplate when creating classes that implement the Fluent Builder pattern, which is unfortunately quite necessary if you don't have a copy method...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: