3 ms·
Optional is a special case of a sum type where one of the types is Null. If you have Null as a type whose only value is null, then an Optional is just a T|Null.
by brabel 9y ago
Optional is a special case of a sum type where one of the types is Null.
If you have Null as a type whose only value is null, then an Optional is just a T|Null. No need for Optional to exist.