• BrianTheeBiscuiteer@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    28 days ago

    Don’t mind the || but I do agree if you’re validating an input you’d best find all issues at once instead of “first rule wins”.

    • rooster_butt@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      27 days ago

      Short circuiting conditions is important. Mainly for things such as:

      if(Object != Null && Object.HasThing) …

      Without short circuit evaluation you end up with a null pointer exception.