4 ms·
For some reason this one feels right to express with if-not to me too. The one place I’ll often use unless is things like: return unless valid raise
by burke 4y ago
For some reason this one feels right to express with if-not to me too.
The one place I’ll often use unless is things like:
return unless valid
raise unless h.key?(k)
I think it might have something to do with:
1. How abundantly clear it is that the condition is a Boolean; and
2. The “false” condition indicating a “no work to do” situation.
I think I only use them for postfix return, break, next, and raise.