hi Venkat,
thanks for a very interesting speech on youtube!
My question is about where to go with
Java, now we have Java 8.
I would like to start with an example.
Suppose we have a class 'Pair', consisting of a pair of Integers.
I have the following pairs: (1,1), (1,2), (1,3), (2,10, (2,20), (2,30). (3,100), (3,200), (3,300).
The idea is to come up with the following map:
1 -> {1, 2, 3}
2 -> {10, 20, 30}
3 -> {100, 200, 300}
In Scala, I came up with a solution that was pretty easy to find and program:
(list is the list of pairs)
and I think it is very elegant.
So I tried to achieve the same in Java 8, and I found, at last, after very much effort,
the following far less comprehensible way:
And now I'm wondering: should Java go towards the power and ease of use of Scala,
or do you see other directions for Java to go?
Piet