3 ms·
In Racket and Scheme, false is the only 'falsy' value, with everything else evaluating 'truthy', which is nice since you don't have to worry about the specifics
by hydroxideOH- 6y ago
In Racket and Scheme, false is the only 'falsy' value, with everything else evaluating 'truthy', which is nice since you don't have to worry about the specifics of the return type.
I think the bigger issue with null or None, though, is not necessarily using it as a return type (where that makes sense, and can be enforced by a type system) but when objects are mutated to the value of null. The bigger issue there is with mutation and side-effects, but having null there as a convenient short cut can be a foot gun that leads to lots of errors.