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
Maksym M.
01/18/2024, 12:38 PM
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
stantronic
01/19/2024, 9:59 AM
yeah, mainly optimization
e
ephemient
01/20/2024, 3:14 AM
don't rely on r8 to remove equals/toString, but it should remove copy if it's unused