News for hackers. Stuff that matters.
Re:Read this post ‘unless’ you’re not a Ruby developer by revskill on Tuesday December 13, 2022 @06:00AM (#33967175)
You need to use it when you want to be negative of ALL the thing after unless.

Basically, do_something unless A

Then it's simple now to manipulate the inside of A, as you only take care of the positive ! That's beautiful and simple design.

Example is you want to validate something.

raise Error unless someValidCondition.

Now decompose someValidCondition by just using positive connectives, simple right ?

There are no comments on this comment yet.