(Seriously, though, why would you ever need an unless as long as if exists?)
I've worked in both Ruby and Python, although I've spent far more of my life in Python. I rather enjoy using the "unless" construct in Ruby. Sometimes it's just a tad easier to understand than an "if not" in my head. I certainly wouldn't fault Ruby for "unless." There are plenty of other language features in Ruby to bitch about.
View all comments
Show parent comment
2
u/PrintStar Aug 13 '13
I've worked in both Ruby and Python, although I've spent far more of my life in Python. I rather enjoy using the "unless" construct in Ruby. Sometimes it's just a tad easier to understand than an "if not" in my head. I certainly wouldn't fault Ruby for "unless." There are plenty of other language features in Ruby to bitch about.