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

I guess it's generally just that it's regarded as fairly idiomatic Ruby. bbatsov's popular style guide, for example (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier):

The same applies to while/until loops, which can lead to quite succinct code.

I've been using it for a long time, so I don't find it confusing at all – but I agree it's pretty rare to find, so I'm not surprised to find out some people would rather not see that!



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: