JSR 335 seems outdated, not aligned with implementation
Evgeny Mandrikov
mandrikov at gmail.com
Mon Dec 10 01:07:34 PST 2012
Hi,
I'm one of developers of Sonar ( http://www.sonarsource.org/ ). And looking
at the fact that IntelliJ IDEA 12 already supports Java 8, I wanted to
update our Java analyzer to also support changes in language, more
precisely JSR-335 (lambda expressions, method and constructor references,
default methods).
Of course I started from specs, but quickly realized that they are
different from what was implemented in OpenJDK Lambda project. For example:
Part G: Default Methods - InterfaceMethodBody contains "default", whereas
in reality it is part of modifiers. And maybe this is not the only one
difference. Aleksey Shipilev confirmed that spec is a bit outdated and
suggested to ask this question here (
https://twitter.com/shipilev/status/277898648753410049 ). So my first
question - is it possible to align specification with an
implementation? Otherwise too risky to do an early adoption.
The second question relates to the fact that Java Language Specification (
http://docs.oracle.com/javase/specs/ ) contains two grammars - one for
exposition (chapters 4, 6-10, 14 and 15) and another one, which is better
suited to implementation (chapter 18). Seems that JSR-335 describes changes
only in the first one. Even if they are pretty similar it would be great to
know changes in the second one. Is it possible? This question relates to
the fact that it took me quite some time to understand how left-recursion
can be resolved between grammar rules "method reference" and "primary". I'm
pretty sure that this problem was solved in reference implementation, but
details of solution not exposed in the specification.
Thanks in advance.
--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
More information about the lambda-dev
mailing list