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
This RFC suggests adding functionality inspired by the maybe library to the Pony stdlib via the itertools package. This provides an alternative API to work with optional types, that is union types with None: ( T | None). Its goal is to facilitate the usage of such optional types for people for which using pattern matching (using match or as expressions) is not convenient. Such types are very common for mutable fields on a class that need to be initialized but there is no value in the optional type to encode a missing thing. In those cases a union with None is initialized to None and updated at a later point.
This RFC suggests adding functionality inspired by the maybe library to the Pony stdlib via the itertools package. This provides an alternative API to work with optional types, that is union types with
None
:( T | None)
. Its goal is to facilitate the usage of such optional types for people for which using pattern matching (usingmatch
oras
expressions) is not convenient. Such types are very common for mutable fields on a class that need to be initialized but there is no value in the optional type to encode a missing thing. In those cases a union withNone
is initialized toNone
and updated at a later point.RFC 66: https://github.com/ponylang/rfcs/blob/master/text/0066-iter-maybe.md
The text was updated successfully, but these errors were encountered: