Re:Modern Java – A Guide to Java 8
by kodablah on Monday November 16, 2015 @01:02PM
(#10575911)
In addition to the other answers, I bet it's easier for a CFG to parse knowing that "->" can't also be "negate and greater than" (since negation is only a prefix op) whereas "=>" can easily be a fat arrow or greater-than-or-equal.
[ Parent
| on HN ]
Why would that be any harder? The tokens are different.
True, Java does not support => as an alternative for >= so the ambiguity does not exist. It was just a guess, but since it was probably not right, I decided to dig. This mail post[1] explains that the extra equals sign becomes a bit annoying w/ other equal signs in the same expression.
1 - http://mail.openjdk.java.net/pipermail/lambda-dev/2011-Septe...