• magic_lobster_party
    link
    fedilink
    616 hours ago

    For me I have the habit of doing findFirst because determinism is important where I work. But I agree with you if determinism is not of importance.

    • @MagicShel
      link
      14 hours ago

      I would only note that for the vast majority of my experience these streams can only return up to a single match. Determinism isn’t really preserved by findFirst, either, unless the sort order is set up that way.

      Finding the first Jim Jones in a table is no more reliable that finding any Jim Jones. But finding PersonId 13579 is deterministic whether you findFirst or findAny.

      Perhaps you work in a different domain where your experience is different.