You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Andy Seaborne <an...@apache.org> on 2016/10/30 21:36:06 UTC

Link: 3 Reasons why You Shouldn’t Replace Your for-loops by Stream.forEach()

https://blog.jooq.org/2015/12/08/3-reasons-why-you-shouldnt-replace-your-for-loops-by-stream-foreach/

so

1 ==> until parallel streams are common ...

2 ==> yes - there is accessibility to be considered
    Principle: code for the next person to pass this way, not yourself.

3 ==> ??? click on the stack in Eclipse.
    (that said, single-stepping gets confused/does
     not always work for lambdas for me at least)

	Andy

Re: Link: 3 Reasons why You Shouldn’t Replace Your for-loops by Stream.forEach()

Posted by "A. Soroka" <aj...@virginia.edu>.
It's the same old story-- a technique doesn't apply itself. It has to _be applied_, with thought and craft.

There are times when it is the objectively better choice, times when it is not, and times when the effort to make it an objective question isn't worth it! {grin}

---
A. Soroka
The University of Virginia Library

> On Oct 30, 2016, at 5:36 PM, Andy Seaborne <an...@apache.org> wrote:
> 
> https://blog.jooq.org/2015/12/08/3-reasons-why-you-shouldnt-replace-your-for-loops-by-stream-foreach/
> 
> so
> 
> 1 ==> until parallel streams are common ...
> 
> 2 ==> yes - there is accessibility to be considered
>   Principle: code for the next person to pass this way, not yourself.
> 
> 3 ==> ??? click on the stack in Eclipse.
>   (that said, single-stepping gets confused/does
>    not always work for lambdas for me at least)
> 
> 	Andy