Small Feedback around zip and

Paul Sandoz paul.sandoz at
Mon Apr 29 01:12:17 PDT 2013

On Apr 26, 2013, at 4:26 PM, Richard Warburton <richard.warburton at> wrote:

> Hi,
> Just had a quick review of some work code comparing imperative vs
> functional style implementations of autocorrelation.  A couple of quick
> observations:
> * Static importing of seems fine when its just taking an
> array as an argument, but people get significantly more confused if you're
> using its 3 overload variant.
> * The lack of unboxed overloads on not only has a performance
> hit, but also makes code more confusing to read, since its arguments end up
> having a .boxed() call.  This seems to confuse code reviewers.
> * Anecdotally most of my uses of zip so far have been on Collections of
> boxed primitives or arrays of primitives.

And are you zipping primitive streams of the same type?

To support all forms would require zip methods for:

ref+ ref
ref + int
ref + long
ref + double
int + int
int + long
int + double
long + long
long + double
double + double

and require additional primitive specializations of BiFunction.


More information about the lambda-dev mailing list