• @[email protected]
    link
    fedilink
    72 months ago

    found the following in our codebase the other day.

    while(booleanFlag)
        return;
    

    thhere wasn’t more in the loop body, that was it. the loop conditional does exist and it can hurt you.

    • Rikudou_Sage
      link
      fedilink
      42 months ago

      Can it hurt you, though? My guess would be every sane compiler and interpreter optimizes this.

      • @[email protected]
        link
        fedilink
        32 months ago

        the codebase readability certainly suffers, and this isn’t the only case of shenanigans like this