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

I use negative flags (but not negations) so that I can break out early with early returns ...

  if (isFeatureDisabled()) {
    // do not proceed
    return
  }
But still the style guide holds, since there is no negations ...


I do try to reframe as different words, such as "right" instead of "notLeft", to eliminate negations.




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

Search: