Module compilation unit grammar
alex.buckley at oracle.com
Fri Mar 18 11:33:55 PDT 2011
On 3/18/2011 9:23 AM, Alan Bateman wrote:
>> 'require' [ModuleRequireModifier] ModuleName ['@' VersionQuery] ';'
> Just going through your mail of 3/11. Should this be "requires" as I
> think that is what javac looks for today? Same this with ModuleProvide
> where I think it may be "provides".
As the scope of the module system expands to include features like
explicit exports of packages/classes, it becomes clear that the
"directives" in the module compilation unit are really _statements_ of a
Java-like language to configure observability (JLS 7.4.3).
Syntax is as usual a matter of taste but we can look to statements in
the Java language for guidance. We find 'import' not 'imports', and
'assert' not 'asserts'. So I now propose 'export' not 'exports', and
'require' not 'requires', etc.
More information about the jigsaw-dev