JPDev@programming.dev to Programmer Humor@programming.dev · 8 months agoifn'tprogramming.devimagemessage-square120fedilinkarrow-up1729arrow-down19
arrow-up1720arrow-down1imageifn'tprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 8 months agomessage-square120fedilink
minus-squareKmlSlmk64@lemmy.worldlinkfedilinkarrow-up13arrow-down1·8 months agoIf someone really wanted to add it, probably the best would be to use unless
minus-squareJoshuaEN@lemmy.worldlinkfedilinkEnglisharrow-up8arrow-down1·8 months agoI really liked having unless in Ruby; a ! can be easy to miss, while unless made it clear without needing to write out != true.
minus-squareHexAndSquare@lemmy.worldlinkfedilinkarrow-up1arrow-down1·8 months agoIt’s also cool when you do unless(!condition). I particularly like this.
If someone really wanted to add it, probably the best would be to use
unless
I really liked having
unless
in Ruby; a!
can be easy to miss, whileunless
made it clear without needing to write out!= true
.It’s also cool when you do unless(!condition). I particularly like this.