|
|
|
|
|
by mabbo
3433 days ago
|
|
The biggest reason- I very rarely need to check if my optional is empty or not. I can write optional-chaining code like in the article above and it implicitly handles both cases. The code I've written using optionals instead is much shorter, much clearer in its intent, and generally has fewer bugs. That's anecdotal experience, not proofs. All I can really recommend is that you try it with an open mind. |
|