You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SHOULD NOT define case classes nested in other classes
Are nested case classes a problem? There's quite a few instances where you might need them, e.g. representing database rows that may have serialized columns.
The text was updated successfully, but these errors were encountered:
The rule is with a SHOULD NOT, meaning that it is optional - like something dangerous, that might prove useful in certain contexts, but you need to be aware of it. This style guide uses MUST NOT for rules that shouldn't be broken.
Speaking of which, nesting case classes in other classes can be dangerous because they are serializable themselves and by nesting them you break Java's serialization.
Are nested case classes a problem? There's quite a few instances where you might need them, e.g. representing database rows that may have serialized columns.
The text was updated successfully, but these errors were encountered: