Y
Hacker News
new
|
ask
|
show
|
jobs
by
folkrav
1522 days ago
Isn't `Optional[T]` just sugar for `Union[T, None]`?
1 comments
whimsicalism
1522 days ago
Touché. I guess a common pattern I find myself doing for Union types is having if statements checking if something is of a type using reflection. When checking if it is none, it is more elegant.
link