4 ms·
kj::Maybe has an `orDefault()` method that is like `.value_or()` but I find that it is almost never useful. You almost always want to execute different logic in
by kentonv 6y ago
kj::Maybe has an `orDefault()` method that is like `.value_or()` but I find that it is almost never useful. You almost always want to execute different logic in the null case, rather than treat it as some default value.
- CyberRabbi 6y agoThen you can make a quick helper subroutine that adds a monadic interface to optional and you can lint away all non-conforming uses of optional.