Heads up: Mapper<T, R> -> Mapper<R, T>

Sam Pullara sam at sampullara.com
Tue Nov 6 09:20:18 PST 2012


Neither Scala nor Guava makes this ordering choice. Let's not be innovative
where it doesn't matter and will only cause confusion.

http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/base/Function.html
http://www.scala-lang.org/api/current/scala/Function1.html

Sam


On Tue, Nov 6, 2012 at 8:10 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:

>
> On Nov 6, 2012, at 4:51 PM, Aleksey Shipilev <aleksey.shipilev at oracle.com>
> wrote:
>
> > On 11/06/2012 10:42 AM, Paul Sandoz wrote:
> >> To align better with EG discussions some nominal function types, such
> >> as Mapper/FlatMapper, were modified such that the type parameter for
> >> the return type is declared first rather than last.
> >
> > And the rationale for Combiner<W, T, W> -> Combiner<W, W, T> in the
> > reduceBy is the same?
> >
>
> Yes, that change is the result of refactoring the type parameter order on
> Combiner:
>
>
> http://hg.openjdk.java.net/lambda/lambda/jdk/diff/e60b1819b652/src/share/classes/java/util/functions/Combiner.java
>
> i.e. the last type parameter, W that is the result type, is shuffled up to
> become the first.
>
> Paul.
>
>


More information about the lambda-dev mailing list