• theneverfox@pawb.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 months ago

      Scroll on down to the first common example there champ.

      If you really think that’s being “too clever” I don’t know what to tell you… A big reason I think that argument is bullshit is because writing simple code isn’t a goal (what does that even mean?) - readability is a big one, and breaking up every part of every conditional would just lead to unreadable spaghetti

      Also, take a look at the languages being discussed. This is a long settled question - every language I’ve ever used has this.

      Including VB, I found out it uses AndAlso…so gross

      • noli@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago
        1. several languages that are still in use have eager evaluation.

        2. I’m a dumb programmer. The more I need to keep implicit behaviour in mind, the higher the probability I’m writing bugs. Short circuit evaluation is an optimization technique IMO and shouldn’t be relied upon for control flow.