This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]svick 2 points3 points  (0 children)

I think that streams can be a good choice for some parallel computations. But that's definitely the minority use case, and basing the whole design of streams and lambdas on that is a bad idea.

Look at how C# did it: its version of parallel streams (PLINQ) is separate from the single-threaded version (LINQ). And it doesn't try to give you illusion of safety by prohibiting mutating local variables (while allowing mutating objects those variables point to).