Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8268483

Guidance on stream limitations in laziness and termination

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8, 9, 11, 17, 21, 22, 23, 24
    • core-libs
    • None

      Streams generally produce elements lazily and avoid production of excess elements when there are short circuiting operations. However, for less common cases laziness is not possible There is a tradeoff between implementation complexity and laziness.

      Problematic cases arise for the use of an "escape hatch" iterator or spliterator terminal operation .

      It would be beneficial to add some guidance to the stream package documentation.

            vklang Viktor Klang
            psandoz Paul Sandoz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: