If there's a possibility that we might need to add more members to the class -- better make it non-data 🙂
g
grandstaish
11/20/2020, 1:21 PM
But
DefaultSwitchColors
isn’t a part of the public API, it’s private
grandstaish
11/20/2020, 1:30 PM
The article is really interesting, thanks! Good to know why `data class`es are avoided in general in published libraries
l
Louis Pullen-Freilich [G]
11/20/2020, 3:31 PM
Yep, the binary compatibility reasons are important for public API.
In this case, using data classes would just add a bunch of methods to the published libraries that we don't need, so we might as well save some method count and bytes if we can.