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
Currently, optional types cannot be nested, so it behaves more like a nullable. Perhaps we should lean into this and make it more like e.g. C#'s nullable types, where it is like an extra value of the type rather than a sum type. Alternatively, we could make it nestable.
Currently, optional types cannot be nested, so it behaves more like a nullable. Perhaps we should lean into this and make it more like e.g.
C#
's nullable types, where it is like an extra value of the type rather than a sum type. Alternatively, we could make it nestable.Nullable bool: true | false | null
Optional bool: Some(true) | Some(false) | None
I think the main practical difference would be allowing coercion into nullable, like
let x: nullable int = 42
The text was updated successfully, but these errors were encountered: