• traches@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    48
    arrow-down
    1
    ·
    9 days ago

    Agreed. OP was doing well until they replaced the if statements with ‚function call || throw error’. That’s still an if statement, but obfuscated.

      • rooster_butt@lemm.ee
        link
        fedilink
        arrow-up
        3
        ·
        8 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.