by varispeed · 3y ago · 0 comments
What would be the consequences of non-data class that only contains data to treat is as a data class? Likely none.
The consequences are exposing state that you don't necessarily want to expose, missed opportunities for optimization (lose fine-grained memory/performance tradeoff ability), imply something is serializable when it isn't, collisions with metaclasses/inheritance weirdness.