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
As I understand it, the intended procedure when adding a field to a case class that I have serialized with upickle is to give it a default value, so that I can continue to read old data
However, if I do this then I lose type safety, since all of my existing code, which doesn't pass the value, still compiles. So I have to define a matching object for the case class, with an apply() method that has all the same arguments and passes them through. It's a bit of a drag
Would you consider an annotation that provides the default value? Or is there some other way to do what I'm trying to do?
The text was updated successfully, but these errors were encountered:
As I understand it, the intended procedure when adding a field to a case class that I have serialized with upickle is to give it a default value, so that I can continue to read old data
However, if I do this then I lose type safety, since all of my existing code, which doesn't pass the value, still compiles. So I have to define a matching object for the case class, with an apply() method that has all the same arguments and passes them through. It's a bit of a drag
Would you consider an annotation that provides the default value? Or is there some other way to do what I'm trying to do?
The text was updated successfully, but these errors were encountered: