4 ms·
Must say I prefer or for this, and consider differentiating false and nil to usually be a code smell: (or a b c)
by escherize 9y ago
Must say I prefer or for this, and consider differentiating false and nil to usually be a code smell:
(or a b c)
- dghf 9y agoThe relevant bit of the article was explicitly concerned with situations where false values needed to be returned if present, and ruled out the use of or for precisely that reason. But I agree: if you were ever in a position where you needed to do this, you might want to reconsider how you were representing your data.