Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Exactly the same here. I write Ruby for a living and use 'unless' where it makes sense or fits with existing code.

That said, when reading code, I often have to pause and mentally translate "unless" to "if not". This is especially true for more complex logic.

Elegant, yes. Additional mental overhead at times, certainly.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: