hoaproject / Option

The Hoa\Option library.
https://hoa-project.net/
9 stars 3 forks source link

Some(null) should be forbidden #9

Closed mathroc closed 7 years ago

mathroc commented 7 years ago

at least I think, otherwise assert(Some($x)->isSome()) could failt

Hywan commented 7 years ago

Some(null)->isSome() will fail, but Some(null)->isNone() is OK. I am glad you ask because I was undecided regarding this particular edge case.

Hywan commented 7 years ago

@mathroc Please, can you review #13?