Comment by MarkMarine

3 days ago

I’m sure there are better ways to do streams on the JVM, scala being a great example, but however imperfect the implementation is streams are such a net positive I can’t imagine the language without them. I pine for the streams API when I write go.

I totally agree with the criticism about exceptions. If you need exceptions inside a stream it turns into a mess.

Overall I agree with you. They are significantly better, even if a little verbose, than not having them. Love cleaning up old loops with a tiny stream that expresses the same thing more compactly and readably.

He’s also right on the parallel benefits not really being a thing I’ve ever seen used.

  • I'm in agreement, too. The intersection of streams and exceptions was not pretty. Streams are still good, but the feature is a little ugly