Stream operations -- current set

Brian Goetz brian.goetz at oracle.com
Sun Oct 7 21:19:14 PDT 2012


>> Its not strictly about efficiency; its about presenting a
>> programming model that is consistent and effective for the users.
>> Sorting shows up in the middle of a pipeline frequently enough that
>> moving it outside the model makes it less useful.
> Then, it seems that my problem would be solved by renaming some
> things: e.g., if we stop calling things "lazy" when they are lazy
> only in a special sense (albeit technically very correct). Or we
> could say something else instead of "stream", because sorting a
> stream feels wrong… Not that I had a particular name in mind, but it
> seems that there may be room for improvement.

Agreed.  In fact, we've done that already in the code -- but have lagged 
behind doing that in our discussions.  We have renamed them 
"intermediate" and "terminal" operations, largely for the reasons you 
state.  Intermediate operations have both stateless (truly lazy) and 
stateful (varying degrees of laziness) varieties.

Are these names better?



More information about the lambda-libs-spec-observers mailing list