Hi. I quite often find that it is helpful to use d...
# android
s
Hi. I quite often find that it is helpful to use data classes for the purposes of testing equality, but I don't need the extra features on those classes in production. Can I trust r8 to remove these, or if not, is there anything I can add to the code to make these "non-data-classes" in release builds?
m
What's your end goal with this? Do you want to disallow usage of
copy()
etc or you think about this in terms of optimizations?
s
yeah, mainly optimization
e
don't rely on r8 to remove equals/toString, but it should remove copy if it's unused
👍 1