Small Feedback around zip and Arrays.stream

Richard Warburton richard.warburton at gmail.com
Fri Apr 26 07:26:08 PDT 2013


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 Arrays.stream 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 Streams.zip 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.

regards,

  Richard Warburton

  http://insightfullogic.com
  @RichardWarburto <http://twitter.com/richardwarburto>


More information about the lambda-dev mailing list