• CanadaPlus@lemmy.sdf.org
    link
    fedilink
    arrow-up
    2
    arrow-down
    6
    ·
    edit-2
    22 hours ago

    I mean, an application could exist where this isn’t even wrong. Maybe as a “subroutine” of another algorithm that only needs a truly composite number most of the time to work.

    That this reads as a joke says a lot about what application we’re intuitively expecting.

    Edit: Not sure why this is being downvoted.

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      20 hours ago

      Edit: Not sure why this is being downvoted.

      Perhaps because it would do better, being replaced with noop.

      A link time optimiser might actually do so.

      • CanadaPlus@lemmy.sdf.org
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        18 hours ago

        That’s kind of what I meant by putting “subroutine” in quotes. You obviously wouldn’t write it like this, you’d just use a random large number with a bit of explanation.

        Oh well, live and learn. I’ll try to be clearer next time.

        • ulterno@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          8 hours ago

          I just took the above comment as continuing the joke, but this explanation actually confuses me more.
          Well, I don’t really think you need to be very clear in this case. Jokes are more fun when you “get” them rather than have them explained.