Only valid in PHP?

  • tetris11@feddit.uk
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    17 hours ago

    Boolean functions have potentially infinite return states depending on error handling

    • True
    • False
    • NA
    • NULL
    • Error1 “You done messed up.”
    • Error2 “You done messed up differently. But again.”
    • Error3 “My tender bosom heaves in anguish”

    etc

      • wischi@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        5 hours ago

        It still can panic/abort and deadlock/wait infinitely long on most fp languages because that’s typically implied. And there isn’t actually a way around that because computation almost always can fail or block indefinitely - and if you have a total language you can implement waits for billions of years, which for all practical purposes is “infinitely” long on human time scales.