Stylianos Gakis
10/17/2021, 4:22 PMvalue class
?
Like I see the benefits of it, but if I am creating a new data class with 1 parameter anyway, why would I not just make it a value class? Any gotchas? Couldn’t find anything in the KEEP regarding this.Stephan Schroeder
10/17/2021, 7:40 PMcopy()
-method and componentN()
for destructuring, so you wouldn't get those one your @JvmInline value class
. But it's not like those seem super valuable if a class only has a single member.
But if you start-off with a single member and then decide that it makes sense to add another member, you'd have a bigger PR because now you'd be switching to those convinience methods throughout your codebase!? It's a bit contrived but it's the best i can come up with.ephemient
10/17/2021, 7:50 PMStylianos Gakis
10/17/2021, 8:50 PMdave08
10/18/2021, 2:54 AMephemient
10/18/2021, 2:58 AM