you are viewing a single comment's thread
view the rest of the comments
[–] 8 points 2 years ago (1 child)

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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 2 years 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.

  • source
  • parent