I think more languages should have `unless`. I have seen lots of code like `if !(this || that)` that would be easier to read with `unless`. Sometimes `if !this && !this` is clear enough but I frequently find that I am decided between two mediocre options. I think the clarity of `unless`outweighs the benefit of another keyword, especially when it is so similar to `if`.

@kevincox People hated Perl because it told them the truth.

Waiting for BASIC's REPEAT...UNTIL to return. It's the inverse of do {} while!


@LionsPhil I'm also in favour of until loops. However with most modern languages supporting a for-each construct I don't need it as much as until.

· · 0 · 0 · 0
Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!