you are viewing a single comment's thread
view the rest of the comments
[–] 9 points 2 years ago (6 children)

If you're in a language that supports it, please don't use if (false) use if ($disallowAllUsers = false && $whateverTheRealConditionIs)

  • source
  • hideshow 6 child comments
  • [–] 6 points 2 years ago (2 children)

    Never seen this, what language or buildsystem is this?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 years ago

    The assignment syntax is too close to comparison, which is what is more typical in that position. I would recommend

    const bool _isFeatureEnabled = false;
    if (_isFeatureEnabled && ...)
    

    if not a proper feature flag (or just remove the code).

  • source
  • parent