I like the default placement.
The Mapper parameter bit just seems inexplicable, though. Principle of
most surprise?
On 11/14/2012 7:27 PM, Ricky Clarkson wrote:
The rationale was to make default a modifier instead of even more
special syntax than it needs to be.
The parameter order isn't very important to me, just a mild irritation
that they seem to want to do it the exact opposite way to everything
that already exists.
On Wed, Nov 14, 2012 at 9:52 PM, Simon Ochsenreither
<[email protected] <mailto:[email protected]>>
wrote:
The default method syntax will change¹ from
public void method() default { foo(); }
to
public default void method() { foo(); }
I haven't found any reasonable rationale for it on the mailing
list (or elsewhere).
I wonder why they changed it to be inconsistent with Java's
existing default value syntax.
They also changed around the type parameter order to "align better
with EG discussions"²:
So basically having a functional interface like Mapper<A,B> will
now mean "it maps to A from B" and not "it maps from A to B" anymore.
A reasonable explanation would be that it follows the order of
methods definitions. But on the other hand, that would be
inconsistent with both the definition of lambdas itself (A -> B)
as well inconsistent with the flow of chained operations like
list.map(...).filter(...) ...
Ideas/opinions?
Just NIH? Or some evil master plan to ship with requested
features, but prevent widespread usage by making them worse than
necessary (Optional comes to mind...)? Just joking. :-)
¹
http://mail.openjdk.java.net/pipermail/lambda-dev/2012-November/006482.html
²
http://mail.openjdk.java.net/pipermail/lambda-dev/2012-November/006461.html
further discussion in
http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/2012-November/000314.html
--
You received this message because you are subscribed to the Google
Groups "Java Posse" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/javaposse/-/0TIctYYriksJ.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To unsubscribe from this group, send email to
[email protected]
<mailto:javaposse%[email protected]>.
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.
--
You received this message because you are subscribed to the Google
Groups "Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.
--
You received this message because you are subscribed to the Google Groups "Java
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.