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

Assume all references to valid_token were to an opposite method named ‘invalid_token’ and suddenly the ‘unless’ will make much more sense.

X = 5 unless invalid_token

Much better than

X = 5 if !invalid_token

Here the humans inability to easily process double negatives, is now an argument for using ‘unless’ in the right circumstances.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: