14 Comments
⭠ Return to thread

Functional programming expresses this idea through a `Maybe` / `Option` type. (Or C++ std::optional). Here's a nice writeup of this same idea of "Separate code that checks for presence from code that calculates values": https://thoughtbot.com/blog/problem-solving-with-maybe

Expand full comment