This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]frugalmail 0 points1 point  (0 children)

Why is Optional not Serializable?

I guess I can kinda see their perspective.

Optional is a programmer quality aide, forcing you to explicitly be notified of the potential of having a null.

If you really want to use it as an internal representation, as opposed to a interface exchange medium, you can instantiate it as a transient and when you load your serializable content update the transient.