-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
As an alternative to having a 'null' value within the language is to use the 'Optional' monad. In both swift and Rust this is implemented as a generic enum with 2 variants: 'some' and 'none'. By encoding the null state into the type explicit unwrapping is required, making it harder to misuse the type in the way which older languages don't offer protection for.
While this could be implemented by the user it makes sense to include it as part of the standard library so that language features can utilise it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request