DEV Community


Discussion on: What language features/concepts do insiders of the language love and outsiders hate?

databasesponge profile image
MetaDave 🇪🇺

if thing_is_false would be better of course.

val_baca profile image
Valentin Baca

It depends on context of course, but in general I tend to disagree. Keeping booleans as the "positive" form seems to make things easier.

I really like to use unless for checking state and arguments at the beginning of methods:


unless has_coffee:
  throw UncaffeinatedDeveloperError()