|
|
|
|
|
by FreakLegion
28 days ago
|
|
Most languages can do this if it's what you want. In Python it would be: class Some[T]:
value: T
type Option[T] = Some[T] | None
def get_owner(id: DocumentId) -> Option[Option[UserId]]: ...
match get_owner(document_id):
case None:
...
case Some(None):
...
case Some(Some(x)):
...
|
|
The name clash is unfortunate, but luckily naming things is famously one of the easiest problems in CS so that should be trivial to solve :P