Monday July 27, 2009
Joseph D. Darcy's Sun WeblogJoseph D. Darcy's Sun Weblog
Showing that no rule is so broad as to not admit an exception, the
As a
As the lead engineer for both
The table below summarizes the
As heard at JavaOne this year, classpath is dead, being killed by the modularity features in JDK 7, JSR 294 and Project Jigsaw.
Today the full logical classpath available to an application or used in
The table below shows the different command line options to There is certainly plenty of opportunity for modularity in JDK 7 to simplify the configuration options needed to resolve dependencies!
(2009-07-21 17:58:59.0) Permalink Comments [9] Project Coin: Literal Grammar Hackery Correction: External to this blog, it was been pointed out to me that the original grammar disallowed two-digit numbers, which is unintended. The fix is to make the DigitsAndUnderscores component in Digit DigitsAndUnderscores Digit optional, as done in the corrected grammar below Circling back to look at some unresolved technical details of the underscores in numbers proposal, I wrote up a combined grammar to allow binary literals as well as underscores as separators between digits. That is, underscores cannot appear as the first or last character in a sequence of digits. The basic grammar change is to convert the definition of Digits (in any base) from the simple left recursive list of digits found in JLSv3, like
to a list where underscores can appear between numbers but the list must start and end with a digit:
This grammar is unambiguous, but as written it requires a look ahead of more than 1 because the recursion is in the middle of the Digits production. I have not attempted any of the usual grammar refactorings to restore a look ahead of 1 since in practice purging the underscores will be implemented by a small amount of additional logic in the scanner as opposed to the actual parsing machinery. The existing rules for distinguishing decimal and octal literals cause minor grammar complications to accommodate underscores immediately after the first digit. Octal numbers must start with a leading zero digit and nonzero decimal numbers must start with a nonzero digit, requirements reflected in rules like NonZeroDigit Digitsopt. To allow underscores after the first digit, a new rule requiring at least one underscore is added, such as NonZeroDigit Underscores Digits. The structure of binary literals is straightforward and entirely analogous to hexadecimal ones. Changing the digit-level productions automatically allows underscores in floating-point literals without the need to explicitly update the rules for those literals. Productions in blue below are additional or changed productions to existing non-terminals; the other non-terminals below are newly introduced to support the enhanced literal syntax. (2009-07-16 16:28:41.0) Permalink Comments [2]
A quick note on the deprecation policy used in the JDK, a question which comes up from time to time.
The general policy for several feature releases is that core JDK components are only marked as
The platform javadoc falls short of deprecating, but does discourage the use of certain API elements,
from particular methods, like the no-arg
When an API element is deprecated,
the recommended practice is to both apply the
|
Calendar
RSS Feeds
All /Annotation Processing /General /Java /JavaOne /Numerics /OpenJDK SearchLinks
NavigationReferersToday's Page Hits: 1382 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||