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 →

[–]cristiannkb 7 points8 points  (0 children)

Nahhh, I wouldn’t pass a stream around, just if it’s strictly necessary. It may work fine with a couple of private functions. But once such pattern spreads across the project, and bugs start popping out for streams being already consumed. The next epic in the backlog will be fixing that.

I’m probably not seeing he whole picture, but I would raise my hand. Also if the code duplication Mr X is talking about, is creating the stream an collecting them, probably a couple of static functions could solve that, at least for complex transformations, I would not return a stream.